Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Close Popup on specific page(s)?


  #1  
Old Mar 29, 2012, 08:53 AM
twb716
 
33 posts · Jun 2010
I have "borrowed" the following code to open a popup window for an audio player ONLY on the front page:


========
<?php if (is_front_page()) { ?>

<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=243,height=422,top=175,scrollbars=no');
return false;
}
//-->
</SCRIPT>

</head>

<body onLoad="popup('http://www.xxx.com/rms/wp-content/uploads/rave/index.html', 'ad')">
</body>

<?php } ?>

========

I have inserted it in the loop. My question:

How to I get the same popup window to close on specific pages? Any information will be greatly appreciated. Thanks.

TB
  #2  
Old Mar 29, 2012, 10:26 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
How to I get the same popup window to close on specific pages?
are you saying the popup shows up on every page?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 29, 2012, 11:23 AM
twb716
 
33 posts · Jun 2010
The popup is only triggered by the front_page. It's a way for me to have an audio player that auto-starts when a user hits the home page, but doesn't stop playing when the user switches pages.

The problem is that on the "Video" page for example, I want the popup to go away. Make sense?
  #4  
Old Mar 29, 2012, 12:38 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
1) I hate popups or video/audio that start automatically
2) The popup is now seperate page and I'm unaware of how you can have one page make another one go away. Maybe is a jscript, but I'd be willing to guess not
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Mar 29, 2012, 12:41 PM
twb716
 
33 posts · Jun 2010
1) Most people hate things like this- it was a client request and went against my recommendation
2) Thanks for the feedback- I'll keep researching.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 04:43 PM
How to close space? joe hark Center area post/pages 4 Oct 13, 2010 02:08 AM


All times are GMT -6. The time now is 11:40 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.