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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help with frames...

Status
Not open for further replies.

milech

Programmer
Feb 11, 2001
23
US
the index page of my site has 2 frames (left and right) - if a visitor views the source of the frames page - they can get either frame's location - then they can type in or copy the url into the address bar to load either particular page - i'm trying to write a script so that if they do try that - when the page loads - it will detect that the page was not loaded within the frameset and automatically redirect them back to the frameset - in other words - i do not want the users to load the 2 pages called by the frameset on their own - the 2 pages must be called by the frameset in order to be viewed - i've tried many different ways to get this to work - nothing has so far - every time it ends up in an infinite loop - if anyone has any suggestions or solutions - please let me know.

your help will be greatly appreciated. -- milech --
 
Try putting this code in each of the frames..

if (self.location==parent.location) parent.location='frameset.html'

Matt.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top