Disable submit button with jQuery
Hello Friends,
Form submission is one of the most frequently used actions in developing web application. If form submit two times than it will create lots of problems so you must take care about submitting form. One of the way is to restrict user by disabling the submit button using jQuery once form submit.
<form id="frm" action="index.php" method="post">
<input name="name" id="name" />
<input name="email" id="email" />
<input id="submit" type="submit" />
</form>
Below is a jQuery code to disable submit button once form submitted:
$('input[type=submit]', this).attr('disabled', 'disabled');
});
//If you want to disable all forms' submit button than below is the code.
$('form').submit(function(){
$('input[type=submit]', this).attr('disabled', 'disabled');
});
If you find any problem in this than let me know by comment.
To know more about programming,JavaScript issues,jQuery,Expression Engine,MYSQL database and Open-source, enter your email address below. We will send you free tutorials.






I am
about 1 year ago
Agree with Landlord sit.Various of online games provided are dynamic sense and free indefinitely.We are looking forward to you to here share the experience of
exciting game competition!
about 1 year ago
Agree with Landlord sit.Various of online games provided are dynamic sense and free indefinitely.We are looking forward to you to here share the experience of
exciting game competition!