I am new to Ajax and I am attempting to use Ajax while using a for loop. After the Ajax call I am running a function that uses the variables created in the Ajax call. The fu
Append .done() to your ajax request.
.done()
$.ajax({ url: "test.html", context: document.body }).done(function() { //use this alert("DONE!"); });
See the JQuery Doc for .done()