CODEDIGEST InstallShield
Home Articles CodeDigest Tutorials InstallShield FAQs
Skip Navigation LinksHome » CodeDigest » Disable Submit Button after First Click to Prevent Duplicate Postback Using jQuery   You are not logged in.
Search
 

Sponsors
InstallShield
 

Sponsored Links
 

Technologies
 

CodeDigest Navigation
 

Technology News
No News Feeds available at this time.
 

Community News
No News Feeds available at this time.
 
Disable Submit Button after First Click to Prevent Duplicate Postback Using jQuery
Disable Submit Button after First Click to Prevent Duplicate Postback Using jQuery
Submitted By Bala Murugan
On 9/7/2009 8:49:29 AM
Tags: CodeDigest,jQuery  

Disable Submit Button after First Click to Prevent duplicate Postback Using jQuery

 

Sometimes, there are chances that the user may click the submit button more than once to post the data. It will be good if we disable the submit button after user clicks for the first time to prevent the duplicate postbacks.

The following jQuery code will help us to do that,

  <script src="_scripts/jquery-1.3.2.min.js" type="text/javascript"></script>    

    <script language="javascript">

        $("form").submit(function() {

            $(":submit", this).attr("disabled", "disabled");

          });

</script>

 

Do you have a working code that can be used by anyone? Submit it here. It may help someone in the community!!

Recent Codes
  • View All Codes..