Hi,
I have a problem while using one ajax function inside of another ajax function,
ie,
function ajaxFunction1()
{
...
...
http.onreadysta techange = RespondFunction 1();
...
ajaxFunction2() ;
}
function ajaxFunction2()
{
...
...
http.onreadysta techange = respondFunction 2();
}
Here, my problem is,
i expect the function ajaxFunction2() should invoke after the full execution of function RespondFunction 1();
but, the actual result invoke the function ajaxFunction2() after invoking the function respondFunction 1() its not waiting for the ajaxFunction1() to complete fully.
Also,
if the respondFunction 1() is inside a for...loop,
i get only the final iteration as a output,
middle iterations are suspended.
Suggest me this regards.
I have a problem while using one ajax function inside of another ajax function,
ie,
function ajaxFunction1()
{
...
...
http.onreadysta techange = RespondFunction 1();
...
ajaxFunction2() ;
}
function ajaxFunction2()
{
...
...
http.onreadysta techange = respondFunction 2();
}
Here, my problem is,
i expect the function ajaxFunction2() should invoke after the full execution of function RespondFunction 1();
but, the actual result invoke the function ajaxFunction2() after invoking the function respondFunction 1() its not waiting for the ajaxFunction1() to complete fully.
Also,
if the respondFunction 1() is inside a for...loop,
i get only the final iteration as a output,
middle iterations are suspended.
Suggest me this regards.
Comment