tomhilton
02-23-2003, 04:42 PM
Hi, I'm completely new to Javascript, use php/html/mysql, but I need to be able to return visitors back to where they came from after visiting my page.
The page they are visiting has a number of buttons and links that are "refresh" types. The visitor can hit these different buttons, reloading the page with different information and adding to their history.length before they leave.
Is there a way to capture a specific history object as a variable (the page they came from when they first visit my page) and use that to return them back to that page, no matter how long or how many times they "refresh" on my page?
Or, should I keep track of the number of times they "refresh" on the page ($x) and use the following: onClick="history.go(-$x)"
I read somewhere that go() isn't as reliable as back().
Any ideas or suggestions would be appreciated.
The page they are visiting has a number of buttons and links that are "refresh" types. The visitor can hit these different buttons, reloading the page with different information and adding to their history.length before they leave.
Is there a way to capture a specific history object as a variable (the page they came from when they first visit my page) and use that to return them back to that page, no matter how long or how many times they "refresh" on my page?
Or, should I keep track of the number of times they "refresh" on the page ($x) and use the following: onClick="history.go(-$x)"
I read somewhere that go() isn't as reliable as back().
Any ideas or suggestions would be appreciated.