Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

force visitors to load page within frames 1

Status
Not open for further replies.

dakoz

Programmer
Feb 2, 2002
74
hi all... i maintain a page using frames, i recently found out that my visitors where loading just the main frame with direct links to it. Is there a way to force them open the page in the frames as it should?

Thanx for your time in advance
 
Use the
Code:
window.frameElement
property : it'll be
Code:
null
if your page is shown outside any frame and
Code:
[object]
if your page is displayed into a frameset. Water is not bad as long as it stays out human body ;-)
 
Hi,

two options:

1. Force back into frames with something like

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Begin
if (parent.location.href == self.location.href) {
window.location.href = 'index.htm';
}
// End -->
</script>


2. Give-up frames :)



::
 
thanx a lot guys... targol's tutorial was very helpfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top