|
December 4, 1999 Forcing Frames Tips: December 1999
Yehuda Shiran, Ph.D.
|
|
If you've designing a frame-based Web page, you may want to make sure the child documents aren't viewed in the main window. We can use JavaScript to load the frameset document if one of the child documents is loaded in the browser window. The following expression can be used to determine if the current page isn't inside a frame:
If you're not familiar with the keywords
The
If you put this script in the HEAD portion of the document, the frameset document is called before the current document loads, so the user doesn't need to wait. Refer to Column 36, Frames and JavaScript, Part I, for a more powerful solution, and several other frame-related tips.
People who read this tip also read these tips: Look for similar tips by subject: |