p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   history.back or hitting the back button won't work (http://p2p.wrox.com/showthread.php?t=16054)

lian_a July 28th, 2004 03:21 AM

history.back or hitting the back button won't work
 
hi!!

how come when I hit the back button in the browser's page, or put a button in my page using history.back, they won't work?

hope someone could help me on this..thanks!

madhukp July 28th, 2004 05:24 AM

May I know what error are you getting ? Are you getting a "Page expired" message which tells you to hit the refresh button ? If this is the case, then you may be submitting a form in post method to the previous page. You may be preventing the page to go to cache. In that case you cannot prevent this. This is a browser security feature. You may have to change the submission method of form to Get (if possible).

If the behaviour is not like this, please specify what exactly happening when you hit back button. You may give a piece of code in the page also.

bmains July 28th, 2004 07:10 AM

Hey,

When using a link, I do:

<a href="javascript:history.go(-1)">Back</a>

history.back I don't think is supported by all browsers, but history.go is.

Brian

rajanikrishna July 29th, 2004 12:08 AM


  or u can use button.

<input type='button' value='Back' onclick='javascript:history.back();'>

If you want to appear as a link use CSS

<style>
input {border-style:solid;border-width:0;background-color:your current background;cursor:hand;}

</style>


lian_a July 29th, 2004 12:14 AM

Hi! Thanks for all those who replied. I tried using history.back but it won't work. Then I found out the calling page contains a javascript which prevents other pages to go back to it..thanks!



All times are GMT -4. The time now is 05:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.