RadAjax for ASP.NET AJAX

RadControls for ASP.NET AJAX

Changing the mouse cursor on Ajax update could be achieved using the client-side event of Telerik RadAjax controls. The easiest way is to use the following events script:

CopyJavaScript
<script type="text/javascript">
    function OnRequestStart(sender, args) {
        document.body.style.cursor = "wait";
    }
    function OnResponseEnd(sender, args) {
        document.body.style.cursor = "default";
    }
</script>

Here is another solution using additional CSS classes:

CopyJavaScript
<script type="text/javascript">
    function RequestStart(sender, args) {
        document.body.className = document.body.className.replace("Normal", "Wait");
    }
    function ResponseEnd(sender, args) {
        document.body.className = document.body.className.replace("Wait", "Normal");
    }
</script>
CopyCSS
<style type="text/css">
    .Wait
    {
    }
    .Normal
    {
    }
    /* override input cursors with a more specific CSS selector */.Wait INPUT
    {
        cursor: wait;
    }
    .Normal INPUT
    {
        cursor: default;
    }
    /* override grid cursors with a more specific CSS selector */.Wait TABLE
    {
        cursor: wait;
    }
    .Normal TABLE
    {
        cursor: default;
    }
</style>