Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HI

I need to disable the SAVE button of the form once user click on it.So that it will prevent multiple submission of same data to server.As there are around 60 field in form it is impossible to check duplicate 1 by 1.


Many many thanks in advance
Posted

1 solution

There are several ways to go about this. You can make a button that is not of type submit, and then make the onclick event disable the button.

You can also catch the forms submit event, and disable the submit button.


In case you run into it later, the best way I have found to enable a button again is remove the disabled attribute altogether, not set it to false etc..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900