Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a button to escape frames?

Status
Not open for further replies.

corpsinhere

Technical User
Feb 15, 2000
23
US
My site has frames. When a user follows a link that leaves my site I will have a small popup(or prompt) window appear asking the the user if they want to escape my frame. I need to know how to write the script which will read the location of the main (as opposed to the navigation) frame, and then reload that page without my surrounding frame.<br>Thanks.
 
From the newly created window, have the confirming answer call a JavaScript function (<FONT FACE=monospace>&lt;a href=&quot;javascript:newplace(<A HREF=" TARGET="_new"> this new function in this example will be called newplace(), and we'll send a url as a parameter:<br><FONT FACE=monospace><br>function newplace(url)<br>{<br>top.location.href=url<br>}<br></font><br>Very simple. <p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href= by Linux</a><br>Learn Linux and Leave out the Windows :)
 
Or you could just target the hyperlink to a new browser window that, when closed again, will show your site waiting behind it. No JavaScript required.

Don
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top