Home     SSI Lab     CSS Templates     CSS     Htaccess     Web Design     XHTML

Design Tutorials

graphic-img   

SSI-D HOME

SSI LAB

CSS Templates

CSS

.Htaccess

Web Design

Getting Started

Site Building

Web Tricks

Legal Issues

(X)HTML

HTML-Kit

Resources





How to maintain a frameset.

Introduction

One common problem for people who are inexperienced with frames or who have not yet acquired the knowledge is that people visiting their framed web sites from search engines often find an individual page which should be part of a frameset. It means the visitor can access the content frame without the other frames which may contain logo or other headers; site navigation; copyright information etc. This problem is easily overcome.

Tested in Mozilla Icon Opera Icon IE6 Icon



Basic Code:

If a single page which should be part of a frameset is loaded without the other frames then it needs to be forced back into the frameset. To do this simple add the following code to the <HEAD> of your document:

<SCRIPT LANGUAGE="JavaScript">
<!--
if (window.parent==window)
location.href = 'index.htm';
//-->
</SCRIPT>

Note 1: index.htm in this example is the main URL of your frameset page. Some people use default.html etc

Note 2: this code must be put into EVERY page on your site which belongs to a frameset except your main frameset page "index.htm"




Advertisement Sign up for free to PayBox.me today and get $25 just for joining AND earn up to $20 per day for participating.