I have an application in which I download all the data when the user logs. I need some data to be downloaded in full to go to the beginning of the application, because if they are not recovered, there may be errors.
Now I have Ajax in this way where under the data:
$.ajax({
url: "cientes.php",
dataType: "json"
}).done(function() {
.....
.....
});
$.ajax({
url: "facturas.php",
dataType: "json"
}).done(function() {
.....
.....
});
How can I make sure that until the two are downloaded, the% start_co% of the application is executed?