prevent the form from submitting, then submit when ajax calls have completed
myForm.submit(function (e) {
e.preventDefault();
var self = this;
$.when(
$.ajax({url: 'ajax1'}),
$.ajax({url: 'ajax2'})
).always(function() {
self.submit();
});
});
EDIT:
For array you could do
myForm.submit(function (e) {
e.preventDefault();
var self = this,
xhr = [];
xhr.push(
$.ajax({url: 'ajax1'})
);
xhr.push(
$.ajax({url: 'ajax2'})
);
$.when.apply($, xhr).always(function() {
self.submit();
});