Forum Moderators: open

Message Too Old, No Replies

prevent multiple form submissions

         

mudogg80

4:00 pm on Apr 16, 2009 (gmt 0)

10+ Year Member



I am trying to prevent a user from clicking the login button on my site multiple times (which is creating multiple sessions). Yes I can disable the form button with javascript when the user clicks the login button, but the problem is when a user clicks the back button in the browser to go back to the form from the page that processes the form/errors, the button is still disabled and the page needs to be refreshed. My question is how can I disable the button, but still enable the button when the user uses the back button in the browser.

Many thanks!

MichaelBluejay

2:13 am on Apr 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Could this be as simple as re-enabling the button when any field is onfocus'd?

Also, if the page is generated by a script, you could have it write a hidden field with a unique string, and then your script could make sure that a form with that string hasn't already been submitted.