Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

Close Popup on specific page(s)?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #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
 
20,145 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
Quote:
How to I get the same popup window to close on specific pages?
are you saying the popup shows up on every page?
  #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
 
20,145 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
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
  #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 04:32 PM.


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