Archive for the ‘AJAX’ Category

JQuery: disable all input controls before postback

Wednesday, June 16th, 2010

If you have very eager users that keeps pushing the submit buttons like a maniac you may want to disable the submit button(s). Here is a script that you can use if you have a UpdatePanel with asynchronous post-backs. The script hooks up to the begin request event and calls a function that finds all submit buttons and disables them.

[code lang=”html”]
<asp:UpdatePanel runat="server">

<!– Here goes all input controls –>

<script type="text/javascript">

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(function() {



<script language="javascript">

function disableSubmitButtons() {
$("input[type=submit]").attr("disabled", true);


[/code]">Entries (RSS) and Comments (RSS).