Preventing double click

From Logic Wiki
Jump to: navigation, search


Put this somewhere in between body tags in an ASP.NET page and it prevents double clicking


<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
 function BeginRequestHandler(sender, args) { var oControl = args.get_postBackElement(); oControl.disabled = true; }
</script>