I have a function which has many different function calls having many ajax calls inside. How do I know if all the ajax calls being triggered by $("#save").click(...)
are completed ?
$("#save").click(function() {
saveUpdateSeatDetails();
markAbsent();
setTimeout(function() {
location.reload();
}, 369);
});
I tried using async: false
, but I get warring suggesting it's deprecated.
I also referred How to know when all ajax calls are complete ?. However, this applies for the entire page. I want this to apply on a particular function only.
(Nothing ES6 )