Ajax Request inside for loop

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ramnivas Gupta

    Ajax Request inside for loop

    for(int i=0;i<10'i++)
    {
    AjaxCall();
    }


    //Issue For loop won't wait for ajax response, it continue and doesn't wait for ajax response.
    I want to run loop on the basis of ajax response
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    then you have to do a synchronous AJAX call.

    PS. you code is not JavaScript. JavaScript is a loosely typed language.

    Comment

    Working...