Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

Close Popup on specific page(s)?


  #1  
Old Mar 29, 2012, 07: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, 09:26 AM
juggledad's Avatar
juggledad
 
23,655 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, 10: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, 11:38 AM
juggledad's Avatar
juggledad
 
23,655 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, 11:41 AM
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 03:43 PM
How to close space? joe hark Center area post/pages 4 Oct 13, 2010 01:08 AM


All times are GMT -6. The time now is 08:24 AM.


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