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 6319157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:45:27+00:00 2026-05-24T15:45:27+00:00

I have a need to collect data from multiple sources (xml or JSON format)

  • 0

I have a need to collect data from multiple sources (xml or JSON format) via AJAX, and then run a function that consumes these data sets.

How can I check that all the AJAX calls are successful before the function is executed? Ideally, I’d like to keep async calls to minimize the response time.

  • 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-24T15:45:29+00:00Added an answer on May 24, 2026 at 3:45 pm

    Conceptually, it would work like this:

    1. Use async calls.
    2. Code a success handler for each call.
    3. When a call succeeds, you store the data from it in some common place and then record that this call has finished.
    4. At the end of each success handler, you check to see if all data is available now and, if so, you can a function to consume it.

    Some pseudo code for an ajax call:

    results = [];
    $.ajax({
       // other parameters here
        success: function(data) {
            results.push(data);
            checkResults();
        };
    });
    
    function checkResults() {
        // if all five results are in, then we're ready to process them
        if (results.length >= 5) {
             processResults(results);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wizard style interface where I need to collect data from users.
I have need to return multiple results from a subquery and have been unable
I am developing a desktop application that will need to collect data (from the
I'm building a system that need to collect some user sensitive data via secured
I have a script that follows that is supposed to collect data from a
I need to collect some data and temporarily store it in memory and then
I have the following: @rooms = current_user.rooms Then I need to build a JSON
I have need to select a number of 'master' rows from a table, also
I have need for a function pointer that takes two arguments and returns a
I have a need to close a parent form from within child form from

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.