Web Hosting Talk







View Full Version : HTML back button that reloads previous page?


Muze
08-19-2005, 05:35 PM
Using the following code -

<input type=button value="Continue Shopping" onClick="history.go(-1)">

-allows me to let the customer go back to what they were looking at. In IE, this also reloads the previous page, but in Firefox, it just goes to the previous page untouched. I realize it's usually more desirable for the back button to not reload, but in this case, I would like it to do that so the "you have 1 item in your cart for $999" message in my header updates. Suggestions?

vito
08-23-2005, 02:29 PM
I don't know the answer to your question, but which shopping cart are you using? With the one that I use, I code my BUY NOW buttons with a hidden variable called "return". So when the customer clicks "Continue Shopping" in the cart, it points to the previously visited page, loading it again, as opposed to acting like a Back button.

Vito