I am trying to update WHILE data processing (to success or completion)
the "successful" part .ajax waits until php finishes ...
In most cases, waiting for "success" is quite normal.
BUT for a longer php (for example, using ffmpeg on a large file) the wait time is too long and generates errors ...
I have this code
$.ajax ({
type: 'GET',
async: true,
url: '__/_/_path_to_PHP_file.php',
dataType: 'html',
data:'__POSTvariable1__='+encodeURIComponent (__POSTvariable1__)+
'&__POSTvariable2__='+encodeURIComponent(__POSTvariable2__),
cache: false,
success: function(data){
$('#div_that_needs_update').html(data);
},
error: function(request, status, error){
console.log ( 'request.responseText --> ' + request.responseText + ' status --> ' + status + ' error --> ' + error );
}
});
•••• I tried "full" from "beforeSend", but is there a "whileLoading" or similar ???
thanks
source
share