Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
Please help, I want users of the site I am working on to stay within the frames that have been set out.
I use js to detect whether the current html document is within a frame. If not they are redirected to the page containing the frameset which will then display the page but within a frame.
I have tried using 'document.referrer' and 'history.previous' to get the source for the new frame but without any success.
I think that document.referrer only returns a value when a href link has been used. is this true? Also, history.previous returns 'undefined' even though the previous page is in the browsers history.
Thankyou all in advance, Pip.
Rather than using the history object, it uses a query string to pass on the URL of the original page. It also uses a second, "utilty" version, of the frameset, one that's been scripted to accept that query string and put the page into it's appropriate spot.
The only thing you'll need to customize is the exact dimenions and number of frames in yourn particular frameset.