Possible Duplicate:
Multiple submit Button click problem?
Have a type=Submit button in a JSP. Requirement is to disable this button on click.
The basic requirement is to stop posting multiple requests of the same form if this button is clicked multiple times for the same form.
Thank You.
Even if you disable the submit
buttonthe user can still submit the form by pressingF5orctrl+F5or even using Browser reload button.So disabling the submitbuttonwon’t be of much use.Why not use Post/Redirect/Get method.
The
PRGpattern basically redirects the user to another page when it isPosted.Hence now when the user reloads or tries to resubmit the form he is calling the Get method so the form is prevented from resubmission.
However this is also not fully secured approach.