Gossamer Forum
Home : General : Internet Technologies :

Bust out of frames

Quote Reply
Bust out of frames
I was just working on a script that uses frames and sometimes I need a page to bust out of the frames so this is just a little code snippet incase anyone ever needs to do something similar...

onLoad="if(parent.frames.length!=0)top.location=self.location;"

...that would go in the body tag.
Quote Reply
Re: [Paul] Bust out of frames In reply to
Thanks for that. Could come in useful.

Any ideas on how to get this to work with those who surf with JavaScript turned off? :-\

- wil
Quote Reply
Re: [Wil] Bust out of frames In reply to
 
Check for internal $ENV{'HTTP_REFERER'} Wink

I have the following code running on my site.

Code:
# Check for internal referer.
if ($ENV{'HTTP_REFERER'} =~/domain.com/) {
# do something
}