Disable Form Buttons | JavaScriptSource

Disable Form Buttons

Justin Barlow Jul 23, 2008


This script will disable your submit button in order to prevent multiple form submissions. Easy to implement.

[The example below will submit to a special file that will cause it to delay processing for five seconds, in order to show how the script works.



Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: disableFormButtons.js


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response


Your question is beyond the scope of these comments. You will need to post it over on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Nov 6, 2008

Would love to have a disable form button action, but will need multiple on submit events as already have extensive js field validation on submit, so, how to implement this additional function, so that it runs if the field validations permit submitting the form?

Mike Gordon Aug 5, 2008