I am writing a small script that makes individual AJAX calls through a loop, and I ran into the most likely obvious problem. It seems that the loop is going to quickly process the data received with ajax, as a result of which it only loads the last piece of data in the loop. I added a notification window that goes through iterations and loads data fine, but it will not be practical in a user environment. The code is just jquery.post () with a callback inside the for loop. I can publish the code on demand, but I feel it can be clarified verbally. Does anyone know a workaround or a better approach to loading data sequentially?
EDIT
.ajaxSetup() is .ajaxSetup() .post() ? Perhaps I can use this to change the asynchronous value for .post () ..
javascript jquery synchronization ajax
Trevor arjeski
source share