I have a button that I would like to disable when the form submits to prevent the user submitting multiple times.
I have tried naively disabling the button with java
if the validation is successful, then disable the button. if it's not, then don't.
function validate(form) { // perform validation here if (isValid) { form.mySubmitButton.disabled = true; return true; } else { return false; } } ...