View Full Version : Script to bust out of frames
JewDoggyDogg
04-30-2001, 01:37 PM
Hi, I'm looking for a small javascript script that busts out of a frame if someone opened your site in a frame. Thanks.
Lizard
04-30-2001, 02:25 PM
code]
<script language=JavaScript>
<!-- // Hide from non js browsers
if (parent.frames.length > 0) {
parent.location.href = location.href;
}
-->
</script>
[/code]
JewDoggyDogg
05-02-2001, 01:45 PM
Does this go inside the body tag? Thanks.
Dawgy
05-02-2001, 02:14 PM
i believe it would go between the head tags along with any other javascript you use.
Dragon
05-02-2001, 04:20 PM
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (window != top) top.location.href = location.href;
// End -->
</SCRIPT>
Put this in the body of the page or pages you want to break out of frames
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.