Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check values of window.history
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00257245
Message ID:
00257463
Views:
21
>>>>>>How do you check the value of the history file. We want to know the page we came from without resorting to storing that in a session variable.
>>>>>
>>>>>Try this from server script:
>>>>>
>>>>>Request.ServerVariables("Http_Referer")
>>>>>
>>>>>This returns the string of the url of the original request.
>>>>
>>>>We tried that, but the variable is not coming across. Is there some additional settings to get this to work?
>>>
>>>Double check your spelling of Http_Referer.
>>
>>Ok. I got it to work. I did a simple test with a Pag1.asp and a Page2.asp.
>>
>>The asp has a button which when clicked issues a
>>document.location.href = "page2.asp"
>>
>>In page2.asp I do
>>
>>response.write( request.ServerVariables( "Http_Referer" )
>>
>>but it gives only the directory. "http://mesweb/scripts/
>>I need to know which page called the 2nd page. Is this possible?
>
>If you use an anchor tag for page navigation, the http_referer works fine. If you need to use the location.href, set the location.href equal to a variable and pass the variable along as a querystring. Or if the pages are in a pageframe, you can simply reference the variable from within another pageframe.

We are using location.href but we were hoping we would not need to use session variables or have to pass another variable. That way the info is self contained and not reliant on what the other pages do. It sounds like this will not be possible.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform