Is there anyway in ASP.NET application, when I click a button anywhere in the application, if the server response takes more than 2 seconds to change the cursor to Hourglass?
I really dont want to write code in each and every page.
Edited:
Sorry, I think I misread your question. Here you go, this should change all buttons (input type submit and button) in a page to do the desired behavior.
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("input:submit, input:button").click(function () {
setTimeout(function () {
document.body.style.cursor = 'wait';
}, 2000);
});
});
</script>