I want to let users know when an ajax postback is in process. There are quite a few posts on the subject, pretty much indicating the same solution ...
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
</script>
... and ...
<script type="text/javascript">
function beginRequest(sender, args) {
//alert("start");
//window.status = "Please wait...";
document.body.style.cursor = 'wait';
}
function pageLoaded(sender, args) {
//alert("end");
//window.status = "Done";
document.body.style.cursor = "default";
}
</script>
... This works perfectly when I tab away from a field but not at all is I simply place the cursor in another field. The Ajax postback, of course, works just fine in either case.
Any ideas on how to fix this ... Been looking but I don't see this problem documented. Anyone find that it works / doesn't for them? Also, if I am posting in the wrong place, please advise
Thanks
T/.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
</script>
... and ...
<script type="text/javascript">
function beginRequest(sender, args) {
//alert("start");
//window.status = "Please wait...";
document.body.style.cursor = 'wait';
}
function pageLoaded(sender, args) {
//alert("end");
//window.status = "Done";
document.body.style.cursor = "default";
}
</script>
... This works perfectly when I tab away from a field but not at all is I simply place the cursor in another field. The Ajax postback, of course, works just fine in either case.
Any ideas on how to fix this ... Been looking but I don't see this problem documented. Anyone find that it works / doesn't for them? Also, if I am posting in the wrong place, please advise
Thanks
T/.