This is a migrated thread and some comments may be shown as answers.

letting users know that a prostback is in process ... add_beginRequest(someFunction) works fine when I tab away from a field but not when when I set focus on another control

2 Answers 193 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 06 Jun 2012, 08:49 AM
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/.

2 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 08 Jun 2012, 08:56 AM
Hello Antony,

To achieve the desired functionality you could try using the RadAjaxLoadingPanel panel and show it over the controls. I am sending you a simple example which demonstrates that. Additionally more information about RadAjaxLoadingPanel you could find here:
http://www.telerik.com/help/aspnet-ajax/ajax-loadingpanel.html

I hope this helps.

Greetings,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Antony
Top achievements
Rank 1
answered on 10 Jun 2012, 10:59 AM
Yup ... that is a different approach and it works just fine for me.
Thanks
T/.

Tags
Ajax
Asked by
Antony
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Antony
Top achievements
Rank 1
Share this question
or