Click here to Skip to main content
15,887,683 members
Articles / Web Development / ASP.NET
Alternative
Tip/Trick

Disable button after click and display text [Processing...]

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
7 Feb 2012CPOL 12.9K   3   3
Or the jQuery alternative: $("form").submit(function() { $("#").val("Processing..."); $("#").attr("disabled", "disabled"); });
Or the jQuery alternative:

JavaScript
$("form").submit(function() {
          $("#<%=btnBuy.ClientID %>").val("Processing...");
          $("#<%=btnBuy.ClientID %>").attr("disabled", "disabled");
         });

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generaladd PRE tag for readability Pin
Sunasara Imdadhusen7-Feb-12 17:47
professionalSunasara Imdadhusen7-Feb-12 17:47 
GeneralReason for my vote of 5 good Pin
CS14016-Feb-12 18:39
CS14016-Feb-12 18:39 
GeneralPlease format your code using code-clock Pin
thatraja17-Aug-11 21:36
professionalthatraja17-Aug-11 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.