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

3 posts, 0 answers
  1. Antony
    Antony avatar
    2 posts
    Member since:
    Jun 2012

    Posted 06 Jun 2012 Link to this post

    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. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 08 Jun 2012 Link to this post

    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.
  3. Antony
    Antony avatar
    2 posts
    Member since:
    Jun 2012

    Posted 10 Jun 2012 Link to this post

    Yup ... that is a different approach and it works just fine for me.
    Thanks
    T/.

Back to Top