Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4260744
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:57:41+00:00 2026-05-21T05:57:41+00:00

I have this code: $.ajax({ type: POST, data: JSON.stringify(formData), dataType: json, url: http://www.test.com/users/ +

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:57:42+00:00Added an answer on May 21, 2026 at 5:57 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code; $.ajax({ url: /Home/jQueryAddComment, type: POST, dataType: json, data: json,
I have http://subdomainA.domain.com/insert.htm with this jQuery code: // JSONify the data var data =
I have this code that performs an ajax call and loads the results into
I have this AJAX code, but it doesn't seem to throw the 'alert' method.
I have ajax request to post data to asmx webservice, how will i post
I have the following code where i construct json data and send to the
I have the following ajax call to webservice to pass json data and get
I have this code in jQuery, that I want to reimplement with the prototype
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.