Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Ajax / Internet Explorer becomes unresponsive when using RadAjax

Internet Explorer becomes unresponsive when using RadAjax

Article Info

Rating: 4

 

Article information

Article relates to

prior to RadAjax v1.5

Created by

Steve, Telerik

Last modified

November 3, 2006

Last modified by

Steve, Telerik


PROBLEM

Internet Explorer becomes unresponsive when using RadAjax

DESCRIPTION
This problem is observed when you have two simultaneous connections running in your application. It might happen for example if you are waiting for a request to be processed by the server and an AjaxTimer ticking every few seconds in the background. In this case the controls on your page may not respond.
The culprit is unfortunately the Internet Explorer browser which allows for two simultaneous connections at the same site only (more info available in MSDN here).

SOLUTION
The solution to this is to always make sure there is one connection available by checking if there is an ajax request already running. This can be easily achieved with the following javascript, where we set a flag to true if there is ajax request in the background, and set it back to false once the ajax request has finished:
 
 <script type="text/javascript">  
 
            var AjaxIsActive = false;  
            function InvokeCallback()  
            {  
                if (!AjaxIsActive)  
                {  
                    AjaxIsActive = true;   
                }  
                else 
                {  
                    alert('Wait for ajax to finish');  
                    return false;  
                }                  
            }  
              
            function CallbackComplete()  
            {  
                AjaxIsActive = false;  
            }  
        </script> 


The InvokeCallback() and CallbackComplete() functions are invoked in the corresponding client-events of the AjaxManager or AjaxPanel controls:

<rada:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientEvents-OnRequestStart="InvokeCallback" ClientEvents-OnResponseEnd="CallbackComplete">
..
</rada:RadAjaxPanel>

<radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <ClientEvents OnRequestStart="InvokeCallback" OnResponseEnd="CallbackComplete"/>
</radA:RadAjaxManager> 

Comments

  • GvG , Sep 19, 2006

    Great - I wondered what was causing this. Was driving me nuts.

  • li , Aug 23, 2008

    OK

  • pavan , Sep 9, 2008

    good one

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.