The link to this page was made without being in the (below) stated frameset that I named "reWrite.htm"
Here's the code for reWrite.htm:
<HEAD>
<TITLE>Re write</TITLE>
</HEAD>
<FRAMESET COLS="200, *">
<FRAME SRC="frame1.html" NAME="leftcolumn">
<FRAMESET ROWS="100, *">
<FRAME SRC="frame2.html" NAME="toprow">
<FRAME SRC="frame5.html" NAME="bottomrow">
</FRAMESET>
</FRAMESET><noframes></noframes>
Here's a general version of the code that is in the top of this page, frame5.htm:
<SCRIPT LANGUAGE="JavaScript">
<!--
if (top.location.href.indexOf("reWriteFrame.htm") == -1)
top.location.href = "reWriteFrame.htm?pageURL&frameNum";
// -->
</SCRIPT>
If your Web site is based on frames, and you don't want the user to be able to load an inner page in a full window, you can rebuild the frame-setting document when the user attempts to load such a page. First, take a look at the following HTML document: This document is named reWriteFrame.htm. The upper and left frames are used for navigation purposes, while the main frame displays the actual content of the site. reWriteFrame.htm initially loads frame5.html as the content page, but other documents can be loaded in that frame as well. Let's assume the user loads a document named frame4.html in the main frame. Everything looks great. We now have a frame-setting document named reWriteFrame.htm, and three child frames named frame1.html, frame2.html, and frame5.html. But what happens if the user attempts to load frame6.html in a separate window? We need to force the frames. First, we'll add a simple script to the HEAD portion of each one of the inner documents (frame1.html, frame2.html, frame5.html, and frame6.html). frameNum needs to be replaced with the index of the target frame. Use 0 (the first frame) for frame1.html, 1 (the second frame) for frame2.html, and 2 (the third frame) for frame3.html and frame4.html. For example, in frame4.html the script would be
<SCRIPT LANGUAGE="JavaScript">
if (top.location.href.indexOf("reWriteFrame.htm") == -1)
top.location.href = "reWriteFrame.htm?frame5.html&3";
</SCRIPT>
The frames are numbered just like all other html elements and you can access them through their index number,
the "&3" portion for the third frame in the frameset