User1535942433 posted
Hi peterthegreat,
As far as I think,you cann't write multiple url in one ajax function. There is a solution is using
$.each. You could for loop of the url list and call the ajax function.
However,I don't recommend you using this way because the value you get will be covered. You'll probably want to use
$('#someDiv').append(). Just like this:
var urls = ['/url/one','/url/two', ....];
$.each(urls, function(i,u){
$.ajax(u,
{ type: 'POST',
contentType: 'application/json;charset=utf-8';
data: '{products:[' + data.join() + ']}',
dataType: 'json',
success: function (results) {....... }, error: function () { alert('error'); } }); return false;
}
);
});
Best regards,
Yijing Sun