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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

test whether you're caught in another's frames

Status
Not open for further replies.

skicamel

Programmer
Dec 24, 2001
126
US
When you have a page load, is it possible to have it check if it's loading in a frame, and if it is, to have it open in a new window instead?

Forgive the ignorance. Not my area of expertise.

Thanks all.
 
The code to put in the header is something like this:

<script language=javascript type=&quot;text/javascript&quot;
<!--Hide script from old browser

if (top.location != self.location) {
top.location = self.location
}
//End hiding script from old browsers -->
</script>

This will reload a page breaking it out of a frameset. Good for when someone links to your site and you want to keep it out of their frameset. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top