When a user clicks a link on our home page, it spawns a popup informing them that they are leaving the site. Once they click the OK button, the link they originally clicked opens in the popup window.
Here's the code from the external file:
Here's the code from the originating page:
And here's the popup code:
The popup opens fine, but the original link is undefined. My knowledge of js is limited, so I'm not sure if I'm passing the address correctly. Can anyone help?
Here's the code from the external file:
Code:
var next_page;
function display_message(clicked_link_href)
{
next_page = clicked_link_href;
window.open("../scripts/speed-bump.html", "", "toolbar=yes,resizable=yes,location=yes,directories=yes,status=yes,menubar=yes,width=500,height=400,scrollbars=yes,screenX=0,screenY=0,top=0,left=0");
return false; //cancels onclick action so href in link doesn't load in main page
}
function next_page()
{
window.location.href = opener.next_page;
}
Here's the code from the originating page:
Code:
<a href="javascript:display_message('[URL unfurl="true"]http://www.ci.seattle.wa.us/')">City[/URL]
of Seattle</a>
And here's the popup code:
Code:
<input type="button" class="button" value="Ok" onclick="next_page()" />
The popup opens fine, but the original link is undefined. My knowledge of js is limited, so I'm not sure if I'm passing the address correctly. Can anyone help?