I'm using jQuerys AJAX functionality to send data to the server as posted below
var updateTLC = $.ajax({
url : resourceUrl + "/update",
type: 'POST',
data : data,
cache : false,
dataType : 'json',
//async : false
});
updateTLC.done(function(data) {
if (data.success) {
successCallback(data)
}
});
updateTLC.fail(function (data, status, error) {
failCallback(data, status, error);
});
My problem is that the function that is called after this is executed before it gets to updateTLC.done. This only happens on Firefox (vers 42), it works fine in Chrome and Edge.
If I use async:false it also works in Firefox. Using async:false is not the worst option here as the following function loads another page. At the moment it loads the page without the data I need.
Appreciate any advice on this