Welcome to WebmasterWorld Guest from 126.96.36.199
I wanted to place a back button on a few of my pages, but I forgot the coding for button to go back to the previous page after clicking on it.
Can anyone help?
<input type="button" value="Back" onclick="window.history.go(-1)" />
I think you can actually use the back() method of the window object too - but's all swings and roundabouts...
*I walk on HTML!*
Remember that the user has to go back before they can go forwards!
about history.go(-1); be careful with it, sometimes it gives strange results... it's best to load again that page using it's url instead of history.go(-1);
you will get wrong results when you want to save a form, click back and save it again... you'll get 2 documents :(
<A HREF="<!--#echo var="HTTP_REFERER"-->">Back</A>
Become a Pro Member