Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable the browser back button

Status
Not open for further replies.

zubz

Programmer
Mar 29, 2005
14
GB
Hi,

is there a way to disable the browsers back button. I need to do this after a form has been sumitted to prevent the user going back and submitt again?

Thanks
 
There is no 100% perfectly systematic way to do this. You could hack up your own version using session variables and passing a timestamp to each page, checking to ensure that the timestamp is always current. You'd also have to disable page caching - which puts more strain on your server from having to reload every page every single time.


You're really just MUCH better off doing server side validation to ensure that the form data is not being resubmitted.

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top