Personally I'm doing my first AJAX and am having a problem which is as follows. It calls a PHP routine that downloads and uploads one or more files via FTP. And this can take a while. How do I get AJAX to wait for it to finish before the answer.
Personally I'm doing my first AJAX and am having a problem which is as follows. It calls a PHP routine that downloads and uploads one or more files via FTP. And this can take a while. How do I get AJAX to wait for it to finish before the answer.
In this case you can use the parameter timeout
to put a timeout greater than the default that I believe to be 30 seconds.
$.ajax({
url: '/...',
timeout: 600000,
success: ...
});