Close Popup on specific page(s)?
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 |
Quote:
|
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? |
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 |
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. |
All times are GMT -6. The time now is 12:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.