Ajax call returns a jQuery Promise object. You can collect the output of each array and use it $.whento combine the promises package.
This code is the main idea of what you want:
function main() {
var finished = false;
var defs = [];
for(var i=0; i < 3; i++) {
defs.push(do(i));
}
$.when.apply(null, defs).done(function() {
});
}
function do(i) {
var promise = $.ajax({
url:"myurl.com/"+i,
datatype:"text/xml",
success: function() {
}
})
return promise;
}
HTTP-, . , . , 2 ajax , ...
Firefox 2: 2
Firefox 3+: 6
Opera 9.26: 4
Opera 12: 6
Safari 3: 4
Safari 5: 6
IE 7: 2
IE 8: 6
IE 10: 8
Chrome: 6