Targeting links to Specific Windows

liunx

Guest
Hi! <br />
<br />
In a website I'm working on, a little pop-up window launches along with the main browser winidow. This pop-up gives a menu of options to choose from. When an option is chosen, it should load in the main browser window. <br />
<br />
How can I direct the link in the pop-up to the main browser window?<!--content--><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.w3.org/" onclick="if (top.opener && !top.opener.closed) {top.opener.location = this.href; return false">W3C</a><!--content-->are you familiar with flash? I'm making this site in flash and the actionscript command for creating a link is "Get URL". I'm wondering how to incorporate your code into the actionscript<!--content-->Set up the javascript function in your html head tag and give it a name:<br />
<br />
<script type="text/javascript"><br />
function myMenu {<br />
if (top.opener && !top.opener.closed) {<br />
top.opener.location = this.href; return false;<br />
}<br />
}<br />
</script><br />
<br />
Then your actionscript link would be getURL ("javascript:myMenu").<!--content-->
 
Back
Top