Vote count:
0
Inside ready function , i am making three Ajax calls which should be executed one after another
I could be able to manage this for First and Second Ajax call ??
My question is how can i call thr third Ajax call based when second is completed ??
$(document).ready(function() {
// First Ajax call
var locationAjaxCall = $.ajax({
type: 'GET',
url: url + '/OMS/oms1/getlocationscreen?screen_ids=' + screen_ids,
jsonpCallback: 'jsonCallback',
cache: true,
dataType: 'jsonp',
jsonp: false,
success: function(response) {
var resp = JSON.stringify(response);
alert(resp);
},
error: function(xhr, ajaxOptions, thrownError) {
}
});
// Second Ajax call
locationAjaxCall.done(function() {
$.ajax({
type: 'GET',
url: url + '/OMS/oms1/fromscratchmodified?screen_ids=' + screen_ids,
jsonpCallback: 'jsonCallback',
dataType: 'jsonp',
jsonp: false,
success: function(response) {
}
});
});
// Third Ajax call
$.ajax({
type: 'GET',
url: url + '/OMS/oms1/fetchcustomerid?UUID=' + qruuid,
jsonpCallback: 'jsonCallback',
dataType: 'jsonp',
jsonp: false,
success: function(response) {
}
});
});
asked 1 min ago
How to manage Ordering of calling Ajax calls
Aucun commentaire:
Enregistrer un commentaire