I want the user to be able to track the progress of each submission in an application. I have one side, sending via ajax, and with php I perform a foreach for batch sending. For example, select the id 1,2,3,5,7, and press send. I want to show on the screen in real time, "sending id1" .... "sending id2", each in its respective moment ... We can think of 2 stages to be displayed: Sending id2 ... id2 sent..e so on .. Sending id3 ... id3 sent. Since this is in a foreach, it will occur batch in succession until all the user selects.
I tried this way:
$("form").submit(function(){
$.ajax({
type: "POST",
url: "arquivo-foreach.php",
data: dados,
beforeSend: function(data){
$(".box").html(data);
},
success: function( data ){
$(".box").html(data);
}//end success
});//end method
return false;
});//end submit
I get the result of all submissions after every process is completed, but it does not appear one at a time while it is being uploaded .. Would anyone know how?