I have a asp.net app that I want to disable the buttons as soon as they are clicked in order to prevent multiple submissions. I\'d like to use jquery for this as the site a
I just wanted to add an additional resolution. We decided to just completely remove the button once it was clicked and replace it with some text.
To do this we did:
$(function () {
$(".DisableButton").click(function () {
$(this).hide();
$(this).after('Please Wait. Retrieving information. This may take up to 60 seconds.
');
});
});
Note that this hides the button then injects some html after the buttons code. Hiding it allows .Net to go ahead and run the onclick handler during post back while removing it as a clickable thing on the screen.