We already know that ajax is asynchronous and the only way to do it synchronously is by setting the async: false
option.
What I want to do is something like that
for (var fact in facturas ) {
sendEmailAJAX(facturas[fact]);
console.log(fact+ "enviado!!!");
}
I want you to go calling sendEmailAJAX
one at a time and not all at once.
I can do it with async:false
but the browser is blocked.
I can not think of how to solve this problem.