home / experts / javascript / column36 |
|
Escaping FramesWhen you create a Web page, you expect the user to load it in the browser's main window. You don't want it to be loaded in another site's frame. By adding a simple cross-browser, cross-platform script into the
The condition evaluates to
Note that the following expressions would also function properly:
Back to the script. If the page's window isn't the topmost window in the object model, your page is being displayed as a frame in a frame-setting document. In order to escape the frames, you need to set the URL of the upper window to the URL of the current page:
|
Produced by Yehuda Shiran and Tomer Shiran
Created: March 1, 1999
Revised: March 1, 1999
URL: http://www.webreference.com/js/column36/escaping.html