Tutorials
CSS
Web Design
XHTML
Javascript
PHP

Web Design Tutorials
Embedding fonts
Page Redirection
Access Hard Drives
Avoiding Spam Mail
Editable Page Content
Copyright Basics
File Include
Mailto Links
Maintain Framesets
Show the Hard Drive
Link Status Description


More information

Web Design Tutorials
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 websites 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.

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"


Discuss this in the Forum  

Search HeaphyDesigns



Stored Pages



Change Site Style
Select a style for the site:




More information