I wrote my first $.when routine but is not working as expected:
$(document).ready(function ()
{
var UserUrl = 'API/StartGetUser.asp';
var StoreUrl = 'API/StartGetStore.asp';
var FeedbackUrl='API/StartGetFeed.asp';
var ItemsUrl='API/StartGetSellers.asp';
$.when(
$.get(UserDetailsUrl),
$.get(StoreCategoryUrl),
$.get(FeedbackUrl),
$.get(ItemsUrl)
).then(function(user,store,feed,items) {
//$.get(mailUrl)
alert(user+' '+store+' '+feed+' '+items);
}).fail(function(err) {
alert(err);
});
It works, but I was expecting that the 4 get would have fired simultaneously, while I found that are executed one after the previous has finished... since is
$.get
it is surely async..
what can be wrong? What shall I check?
btw, serverside is classic asp and request are on same machine as can see from url.
thanks for any hints
Joe