View Full Version : "am I in a frameset" detector
06-27-2002, 05:15 PM
Is it possible for a page to detect whether it's in a frameset and disply - or not - a break frames button?
06-27-2002, 05:23 PM
if (top.location.href != location.href)
if(confirm("do you want to break these frames?"))
top.location.href = location.href
that script should pop up a box asking if you wna to breakt the frames and if the user clicks yes then they pop!
06-27-2002, 05:38 PM
You could also place a script in the body section of your document to write out a link if it is in frames like this:
<title>Break out of frames link</title>
<TABLE ALIGN="center" BORDER="1" WIDTH="50%" HEIGHT="20%" CELLSPACING="0" CELLPADDING="0">
<TD ALIGN="center" VALIGN="top">
if (window != top)
If you don't want a text link then you could also use an image. If you want a form button then you could write the appropriate form tags. Good Luck.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.