Disable / Re-Enable Button on the fly
Posted on 2007-04-08
I have a PHP form, and when the submit button is pressed, I'd like to disable it and change it's value to "Processing... ". I figure I need JS to do this.
The thing is, all of the form validation and processing takes place within this same page (i.e, it doesn't submit to another page). And I can't change that for other complicated, political reasons....
Is there a way that I can disable the button & change it's value onClick, but in the event that the form returns errors, re-enable it?