for (var i=0;i<ToArray.length;i++) {
$.post('jquery/messages.php',{To:ToArray[i],subject:subject,msg:msg},function(data){jAlert(data);});
}
User can send short messages to another user(s). The names are commaseparetad and after i split the string i want to send the same message to the different users with a for loop.
if something goes wrong (eg. there is no such user in the database)the server alerts the user and stop the process. If the user have pressed the "ok" button the process continues.
my problem is that the loop never stops and it alerts only the last wrong name.