|
||
| Inside Technique : Frame Master : Static Solution The most simple solution is to add a small script that tests whether the document
is within its frameset:
The above code just checks whether the frameset exists. However, it does nothing to prevent your frameset
and documents from appearing within another frameset. To always make sure your document is not only in the
frameset, but the frameset is the top-most frame, change the parent reference to a refernece to the top:
The above two solutions work if the frameset document is already defined containing the
current document. For example, the above code works assuming the top-most frameset was defined
similar to the following and the document with the code was named page1.htm or menu.htm:
If the user enters page 1 outside of the frameset, it is properly loaded. However, if the user enters a different page (eg., page2.htm) that is expecting to be linked and contained within the above frameset, the redirection would not work properly. Instead of seeing page 2 inside the frameset, they would see page 1. Next, we dynamically generate the frameset document to allow it to automatically contain any document. Page 1:Frame Master © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |