2. Selctive Frames Breakout
var args = location.search.substr(1).split("?");
if (top.location != self.location && args != "f")
top.location = self.location;
Let is suppose that your page is called page.htmindex.html and that therefore any links to your page will be coded like this.
<a href="index.html">link to page</a>
We do however now have a second way that we can link to the page where we tell the page not to break out of any frames that it may happen to be in. To do this we code the link like this:
<a href="index.html?f">link to page</a>
We can of course also make use of this to code a reference to the page within a frameset definition itself using the following code:
<frame name="main" id="main" src="index.html?f" />
So this version of the page gives you complete control over when your pages will appear in frames because unless you specifically add the ?f to the end of the link the page will automatically break out of any frameset and since you will only specify the ?fm where the page is to be displayed in frames the index.html?f address will not appear in the address bar making it unlikely that others will think to include it when linking to your page.
Note that this page is copied from the "Ask Felgall" website with the permission of the copyright owner.