aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Disable Submit Button After Click to Avoid Duplicate Form Submission

Jul 27, 2013

Here I will explain how to use
jQuery to disable submit button after first click to avoid duplicate or multiple form submission or jQuery disable submit button after click to avoid duplicate form submission.

In previous articles I explained
jQuery Get Current Datetime, Auto refresh page , Expand textbox on focusDisable right click on image and many articles relating to jQuery. Now I will explain how to disable submit button after click to avoid multiple form submission using jQuery.

Disable a button after click

$('#btnClick').click(function() {
$(this).attr("disabled", true);
$(this).val('Please wait Processing');
// Write your Code
$(this).attr("disabled", false);

If you want to see it in complete example write the code like as shown below

<html xmlns="">
<title>jQuery Disable Submit Button to avoid multiple times form submission Page</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
$('#btnClick').click(function() {
$(this).attr("disabled", true);
$(this).val('Please wait Processing');
// Write your Code
$('#btnReset').click(function() {
$('#btnClick').attr("disabled", false);
<input type="button" id="btnClick" value="Click" />
<input type="button" id="btnReset" value="Reset" />

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


sanju said...

Very Nice...

Anonymous said...

Just a question. What will happen, if the page is refreshed instead of clicking the button? Don't you think redirecting the page is wise decision.

Saravanan said...

how to create progress bar in jquery

Unknown said...

The Form is not submitting while i use document.getElementById("demo").disabled = "true"; Why?
How to acheive that?

Give your Valuable Comments

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.