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

[Solved] jQuery ajaxComplete binding

1 Answer 256 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
QScend
Top achievements
Rank 1
QScend asked on 11 Jun 2009, 07:27 PM
I'd like to know if anyone has been able to use jQuery to bind to the ajaxComplete event in the browser when using radAjax. It seems to simply not work but I could be doing something wrong.


jQuery(document).ready(function(){ 
    //maybe do some stuff here 
    jQuery(window).bind("ajaxComplete"function() { 
        //this should alert after any ajax request completes. 
        alert("AJAX ROCKS!!"); 
    }); 
}); 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 17 Jun 2009, 11:32 AM
Hello Keith,

The ajax events of the JQuery framework will be raised only when you trigger ajax request using the $.ajax method as explained in the JQuery online documentation:

http://docs.jquery.com/Ajax_Events

Therefore, you will not be able to use this approach in combination with ASP.NET AJAX (UpdatePanels in particular) or our RadAjax which is built on top of the ASP.NET AJAX framework.

A possible workaround for your case would be to intercept the OnRespondEnd client event of our RadAjaxManager or RadAjaxPanel to execute some custom logic when the ajax request finishes execution. See the online demos below for more details:

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/clientevents/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/ajax/examples/panel/clientevents/defaultcs.aspx

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
QScend
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or