/ Published in: JavaScript

This works cross browser. Merely using onclick on a submit button to show a preloader/ please wait dialog doesn't work in IE since it doesn't show images once the page is being unloaded.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript" src="https://github.com/malsup/blockui/raw/master/jquery.blockUI.js"></script> <script type="text/javascript"> $(document).ajaxStop($.unblockUI); $(document).ready(function () { $('#lnkBtnPrevious').click(function () { $.blockUI(); }); $('#lnkBtnContinue').click(function () { if (typeof (Page_ClientValidate) == 'function') { Page_ClientValidate(); } if (Page_IsValid) { $.blockUI(); } }); }); </script>
URL: http://jquery.malsup.com/block/
Comments
