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

HTTP_REFERER & Frames

Status
Not open for further replies.

RubyRoot

Technical User
Feb 16, 2002
14
CA
I've got a site with 3 frames. The one on the top has a link to an asp page that opens in the content frame.

I need to find out the previous page in the content pane. I tried using HTTP_REFERER but it didn't work and i think it's because the refering page is the parent window.

I also tried using history.previous but that didn't work either, something to do with settings that only apply in Netscape. I kept getting 'undefined'

Any help would be greatly appreciated.
 
you can only navigate through the history list, it cannot return you the url. This would allow websites to determine what pages their visitors have been viewing in that browsing session, thats a privacy infringement.

what you can do is store the location of the content frame in the frameset page, as long as your frameset page doesnt reload you will be able to use it to hold urls in variables declared in the frameset page. So whenever a page gets loaded in the content frame you make a call to the frameset to find out the previous url, once you have got it set it to the current url.
 
FYI, i got it work. I used javascript and got the right effect.

var url = parent.frames('content').location.href;

var pagePath = "/feedback/feedback.asp?page=" + url;
parent.frames('content').location = pagePath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top