I have two Ajax calls in my MVC code, for both I have set async: true
, but however after first request is made and if I try to make 2nd Ajax request, the 2nd is waiting first to get response, only after getting first Ajax response, 2nd request's result is appended. I am not finding solution for this.
Code is as below:
First call:
var page_request = $j.ajax({
url:pageurl+'?rel=tab',
async:true,
dataType:"html",beforeSend: function () {
middlePanel.html('Loading...');
},
success: function(data){
middlePanel.html(data);
fitBoundsWithoutSeco();
},
error: function (xhr, textStatus, errorThrown) {
middlePanel.html(textStatus);
}
});
The second is same as first.