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 » Header configuration & styling »

[SOLVED] HTML Inserts and overlay image problem - launching wrong page


  #1  
Old Jan 16, 2013, 03:19 PM
harty
 
28 posts · Sep 2009
[SOLVED] HTML Inserts and overlay image problem - launching wrong page

Hi there.
I am in the process of building a site for my music podcasts.
I am using a button in my header area to launch a pop up window that features my MP3 player.
The system is that people can press play – and if they want, can click away from my website to go elsewhere (while my podcast keeps playing in the popup).
Due to the nature of my podcast downloading will not be allowed - streaming only.

Now to my problem.
The button I have created to launch the pop up window works fine when I am looking at the home page. But if I click to another page on my site, the pop up button launches a new window that features the URL of the page I am looking at.

For example.
The popup button in the header on my front page launches the URL:
http://mysite/listen-live.html

But if I am looking at my 'dedicate a song page' I click the same button but get a pop up that shows the URL
http://mysite/dedicate-a-song/listen-live.html [this is wrong]

In the Atahualpa admin section - HTML Inserts, I have placed the code:

<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=300,height=200,scrollbars=no resize=no');
return false;
}
//-->
</SCRIPT>


In the CSS Inserts field I have placed:
#header_image_sociable {position: absolute; left: 430px; top: 25px;}

And in the Overlay image field I have placed the code:
<div id="header_image_sociable"><a onclick="return popup(this, 'notes')" href="listen-live.html"><img src="/wp-content/my-images/Listen-Now-button.png" width="170" height="52" BORDER="0"></a></div>


Can anyone help me so that no matter what page or category a person may be looking at, that when they click the Play Button in the header area, the only page that will be launched is: http://mysite/listen-live.html

Many thanks for your time.

Sincerely.
  #2  
Old Jan 16, 2013, 03:31 PM
harty
 
28 posts · Sep 2009
Okay, just had a brainwave and think I have fixed it.

I changed the URL of the popup to the full URL, so it is now:

<div id="header_image_sociable"><a onclick="return popup(this, 'notes')" href="http://mysite/listen-live.html"><img src="/wp-content/my-images/Listen-Now-button.png" width="170" height="52" BORDER="0"></a></div>

But any comments on the codes I have used are welcome (live and learn...).

Thanks.
  #3  
Old Jan 16, 2013, 03:53 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
well I was going to tell you to fully qualify the url, but you beat me to it yourself...
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jan 29, 2013, 12:58 PM
harty
 
28 posts · Sep 2009
Hi Juggledad.
Creating a popup to work on all browsers in the same way has been a challenge. I am using the following code [below].
The popup button in my header area only launches the popup window correctly if the user is on my front page at www.ThePleasureDome.co.
If they click the popup button while looking at any other page, then the whole page features the popup window, and the popup is launched too.
I'd be grateful for any advice or help you can offer to solve this.
Sincerely,

Steve


<SCRIPT TYPE="text/javascript">
var WindowObjectReference;
<!--
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=310,height=320,status=yes,toolbar=0,scrollb ars=0,location=0,statusbar=0,menubar=no,resizable= no'); TheNewWin.moveTo(100,100);
return false; win.focus();
}
//-->
</SCRIPT>
  #5  
Old Jan 29, 2013, 01:02 PM
harty
 
28 posts · Sep 2009
Fixed it.

I deleted the code: TheNewWin.moveTo(100,100);

that places the window where I want it to appear.

Sorry to have bothered you.

Steve

Bookmarks

Tags
css inserts, html inserts, overlay image, popup, url

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
why Fields in the Atahualpa 3.3.3 does not expand? css inserts, html inserts krystyna New Versions, & Updating 3 Oct 28, 2010 12:22 PM
HTML/CSS inserts in Atahualpa 3.4.1 (for custom header image slider) csb Header configuration & styling 3 Nov 16, 2009 07:02 PM
[SOLVED] Problem with code in HTML/CSS Inserts xavison Post-Kicker, -Byline & -Footer 4 Jun 26, 2009 11:59 AM
[SOLVED] why Fields in the Atahualpa 3.3.3 does not expand? css inserts, html inserts ppat2 New Versions, & Updating 3 Jun 2, 2009 05:41 PM


All times are GMT -6. The time now is 02:49 PM.


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