Click here to return to IRED.com
Navigation Tabs


Mortgage Lenders Tools for Agents Consumer Services Ratings and Icons Descriptions USA Realty Directory International Realty Directory Add or Enhance a Link in the IRED Directories Advertising on IRED Information about IRED Site Map

[an error occurred while processing this directive]

WEB BIZ - Tech Tips
The Frame Game
Copyright © 1995-2004 IRED.Com, Inc.
All rights Reserved

The proper use of FRAMES can enhance site navigation, but sometimes either through a coding error, or intentionally,your WEB page will be displayed in someone else's frame.

You probably already know, that you can right click to view a framed page in its own window.But did you know you can keep your own pages from getting locked behind someone else's frameset, by using just one line of script in the HEAD tag?

This simple JavaScript, based on one by Ron Dresser, will automatically load your page into the current window, even when someone has linked to your page without the parameter.

<HTML>
<HEAD>
<TITLE>Your Page Name</TITLE>
<script language="JavaScript">
<!--if (self != top) { top.location.href = self.location.href }-->
</script>
</HEAD>

If you use frames on your own pages put this code in the document(s) containing the actual frameset specification - not in the subpage documents that are loaded into the frame.

The Link
To prevent outside links on your pages from getting trapped in your frameset, use the following link format:

<a href="/" target="top">.

The target tag, will cause the linked page to open in the current window, not the individual frame.

Caution: The HTML code in this instance is case sensitive.If you capitalize the tag parameters,as TARGET="TOP" , the linked page will load in a NEW browser window.

This can create a serious problem for users who don't realize a new window has opened, and use the back button to return to your site.For every link they click on they will get a new browser window.


| IRED Home | Search IRED |


© 1995-2009 IRED.Com, Inc
All Rights Reserved