I have a problem which I can simplify down to the following:
Basically, I am firing multiple ajax requests (with ajaxRequestWithTarget) and the OnResponseEnd method is firing more and more times the more you fire the requests.
If you create a page using the code above, the first time you press "Fire" OnResponseEnd fires 3 times, the next time it fires 5, the next time 7, etc.
Equally if you change the ajaxRequestWithTarget to ajaxRequest, the responseEnd fires twice, four times, six times, eight time etc. This only seems to occur with multiple ajax requests.
I'm seeing old ajaxrequests that have finished keep firing the OnResponseEnd event - surely this isn't right?
Thanks,
Stephen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Untitled Page</title> |
</head> |
<body> |
<script type="text/javascript"> |
function responseEnd(sender, eventArgs) |
{ |
alert(eventArgs.get_eventArgument()); |
} |
function firePostBack(arg) |
{ |
$find('<%=ajaxManager.ClientID %>').ajaxRequestWithTarget('<%=ajaxManager.ClientID %>', arg); |
$find('<%=ajaxManager.ClientID %>').ajaxRequestWithTarget('<%=div.ClientID %>', arg); |
} |
</script> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" /> |
<div> |
<telerik:RadAjaxManager RequestQueueSize="2" ID="ajaxManager" runat="server" ClientEvents-OnResponseEnd="responseEnd"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="ajaxManager"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="div" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
</div> |
<div id="div" runat="server"></div> |
<a href="#" onclick="firePostBack('1');return false;">Fire</a> |
</form> |
</body> |
</html> |
Basically, I am firing multiple ajax requests (with ajaxRequestWithTarget) and the OnResponseEnd method is firing more and more times the more you fire the requests.
If you create a page using the code above, the first time you press "Fire" OnResponseEnd fires 3 times, the next time it fires 5, the next time 7, etc.
Equally if you change the ajaxRequestWithTarget to ajaxRequest, the responseEnd fires twice, four times, six times, eight time etc. This only seems to occur with multiple ajax requests.
I'm seeing old ajaxrequests that have finished keep firing the OnResponseEnd event - surely this isn't right?
Thanks,
Stephen