Q:

jquery how to send json data to multiple links? 

I have this code:
$.ajax({
  type: "POST",
  data: JSON.stringify(formData),
  dataType: "json",
  url: "http://www.test.com/users/" + get_back + "",
  success: function(t){
    alert(t);
  }
});

I was wondering how can I POST to multiple links?  Do I have to create another $.ajax POST or can I just add more url fields into the same POST? 
Thanks

A:

You have to do it multiple times, one for each URL you want to send to.  But there are shortcuts:
var urls = ["http://www.test.com/users/", "http://www.example.com/users/", "http://www.test.org/users/"]

$.each(urls, function(index, value) {
   $.ajax({
      type: "POST",
      data: JSON.stringify(formData),
      dataType: "json",
      url: value + get_back + "",
      success: function(t){ alert(t); }
   });
});

We are putting all the URLs you want to POST to in a JavaScript Array and then using jQuery's $.each to iterate through them and do an AJAX POST to each one.