How can I make each iteration a new Ajaxcall that needs to be async. without using
async: false,
If I do this with the async I get a warning message, and my UI Freezes, how can I fix this? This is not a normal for loop
EDIT1
var username = "username1";
var password = "test";
var code = "";
for(var i = 0; i < results.lenght;i++){
$.ajax({
data: {username:username, password: password},
url: './php/'+results[i].NAME+'.php',
method: 'POST',
datatype: 'json',
success: function(msg) {
//all the msg info needs to be filled in in the html. via the var "code"
}
});
}
return code;