Link to home
Start Free TrialLog in
Avatar of idontknow12002
idontknow12002

asked on

How do I know the previous URL ?

Let say I have a ASP page called previous.asp.

How do I know and print out the previous URL before coming to previous.asp.
I am NOT talking about server variable - HTTP_REFERER.

For example, I am viewing 123.45.678.2/test.asp, then I changed my URL at the location
textbox, and typed 123.45.678.2/hello/previous.asp and hit enter to visit previous.asp.

Then, I should see 123.45.678.2/test.asp get printed on the screen. How do I do that ?
Avatar of rdmjrb
rdmjrb

I ran across a similar problem and came up short trying to deal with the 'Back' button. The technology simply was not there. When the user does not use your application to navigate you are, as I found, at a loss. However, I would love to see this solution!

1. use the javascript DOM's 'history' object
2. store the name in a hidden variable, pass it along appropriately
3. use a modal browser, with no 'location textbox' or menu items, now you can see where they are coming from and print it out all day

hi..i think history will do it

history.go(-1)  //call this in a function


rgds
san
URL information in the history object is not accessible as property values in IE. They are in Navigator 4 and later with special privilege.
You can navigate the history object by calling its methods (back(), forward(), go()).
As far as I know, you cannot do what you want to do.
ASKER CERTIFIED SOLUTION
Avatar of epeele
epeele
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial