1
$("#gerar-senha").on("click", function(){
$.ajax({
url: "gerar-valores-randomicamente.php",
type: "POST",
data: $("#formulario").serialize(),
success: function(data){
$("#myModal").modal();
$("#myModal").find("#modal-body").append(data);
}
});
});
My idea is to open a modal and add an update log inside it while the query
is being rolled.
Is there anything function in ajax
print the data while the query is running? com success
the request only appears when successful.
for example:
$id = "1" ;
do{
//faz o update
$result = $database->update($query, array(":id",$id));
$id++;
echo "coluna ".$id." fez o update com sucesso";
}
while($id <= "2000");
within the modal:
| column 1 made the update successfully;
| column 2 made the update successfully;
| checking // while query is being run
| column n did the update successfully; //after checking, it is shown whether it was updated or not
No. Practice is simple: a request gets an answer. To do what you want, you would have to do a loop in your JS, calling the WS to make a update at a time.
– Victor T.