| To prevent a page from appearing within a
frameset we can force a page to always be in the browser window by itself. In
JavaScript, windows appear in a hierarchy, with the parent window at the top of the heap.
<SCRIPT>
/*
check to see if the location of the current page (self) is the top-most in the browser in
the window hierarchy. If it is everything is OK & nothing needs to be done, if not
then force it to be the top page by self.location =
top.location. EXPLANATION: window.top
(or top for short since it is understood to be the window) is a window object that is the
top-level window that contains the window. If window is a top-level window itself, the top
property simply contains a reference to window itself. If window is a frame, the top
property contains a reference to the top-level window that contains the frame. NOTE:
the property refers to a top-level window even if window refers to a frame contained
within another frame (which may itself be contained within a frame, and so on).
*/
if (self.location !=
top.location) self.location = top.location;
</SCRIPT>
<BODY>
<H1>A really important page here that everyone wants to steal</H1> |