This script first checks to see if your content page is trying to display outside its frameset. If so, it redirects your visitor to a framed page and loads the orphan into an alternative frameset that you design. Visitors see the page they expect - in a format that allows them to navigate easily to other pages within the site.
As an added benefit, this is a framed page that visitors can bookmark!.
Insert this code into the HEAD section of each page that should always display inside a frameset:
Then, create a new page and name it master.html. Leave the BODY section empty and place this code inside the HEAD section:
Note that this script creates a frameset that allots 20% of the frame size to the left frame and 80% to the right frame. You can adjust these as needed to accommodate your site.
Debugging And Maintenance
Even simple JavaScript code can cause debugging headaches. If your script doesn't seem to work properly, check these things first:
|