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

Multiple AjaxRequests at same time

1 Answer 114 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Gosha
Top achievements
Rank 1
Gosha asked on 12 Jun 2011, 07:25 PM
I have MasterPage and its ChildPage. On ChildPage I have JavaScript function that is raised on RadSplitter.OnClientLoad="abc". Basicly, this fires on page load as last client event and that is good for me to do something.

function abc() {
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('DoSomething');
}

This works normally.

Now I want to add one JavaScript-to-AjaxRequest function to MasterPage, I want to check something from database when every ChildPage gets focused, something like this (this is on MasterPage):

window.onfocus = function onFocus() {
    $find("<%=RadAjaxPanel1.ClientID%>").ajaxRequest('DoSomething');
};

Because I can't have two AjaxManager (on MasterPage and ChildPage), I put AjaxPanel in MasterPage.




So, when I request ChildPage in browser, both AjaxRequests should be fired, first one in MasterPage and then from ChildPage. RadAjaxPanel1.ajaxRequest from MasterPage works but AjaxManager.AjaxRequest from ChilPage don't work! When I remove function from MasterPage, function from ChildPage works normally and vice versa.


How to set both AjaxRequests work together, simultaneously? Obviously there is some conflict beetween them.


There is many articles on Internet about multiple AjaxRequests on same time but I don't understand what to do to correct problem.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Jun 2011, 05:37 AM
Hello Gosha,

The following forum thread discusses the same scenario. Check the thread for more details.
Multiple AjaxRequest Events.

Thanks,
Princy.
Tags
Ajax
Asked by
Gosha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or