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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:00:07+00:00 2026-06-12T05:00:07+00:00

I have two separate Ajax Post requests that i need to add together, they

  • 0

I have two separate Ajax Post requests that i need to add together, they are both linking to a currency exchange feed, its basically two values that get converted from different currencies and then need to be added together after both being converted to one currency, ive gotten them both on the same currency no i just need to add the two results together to get a final total.

Here are the two requests

    var dataString = "amount=" + entireTotal + "&from=" + from + "&to=" + to;
        //Lets Get the exchange rates from our total
     $.ajax({
       type: "POST",
       url: "http://fileserver/website/modules/mod_calculation/js/currency.php",
       data: dataString,
       success: function(data){
        $('#inputresult').show();
        //Put received response into result div
         $('#inputresult').html(data);
       }
     });

var dataString = "amount=" + amountGel + "&from=" + fromGel + "&to=" + toGel;
            $.ajax({
       type: "POST",
       url: "http://fileserver/website/modules/mod_calculation/js/currencygel.php",
       data:  dataString,
       success: function(data){
           $('#resultsgel').html(data);
         //Show results div
         $('#resultsgel').show();
        //Put received response into result div
       }
     });

any help at all will be much apreciated.. 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-06-12T05:00:09+00:00Added an answer on June 12, 2026 at 5:00 am
    var request1 = $.ajax({ ... }),
        request2 = $.ajax({ ... });
    
    $.when(request1, request2).then(function(response1, response2) { ... })
    

    Further reading:

    • A good article about how to use promises in jQuery: http://joseoncode.com/2011/09/26/a-walkthrough-jquery-deferred-and-promise/

    • And the official documentation pages.

    Small abstract example similar to what you need (sorry, don’t have enough time to create ajax requests there, but they behave exactly the same): http://jsfiddle.net/Y26zd/

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

Sidebar

Related Questions

I have two separate applications (both part of the same system) that share a
I have two separate (but similar) bits of jQuery code. They both work, but
I have two separate sets of tables in the same database that model the
I have two separate Python List that have common key names in their respective
The problem I have is I have two seperate AJAX requests using jQuery, One
I have a page with 2 separate forms that can be submitted via Ajax
I have the following dilemma with two elements (menu items) that I need to
We have two separate web-apps, say 'retailUI' and 'bulkUI'. These two are basically two
I have two separate caches running in a JVM (one controlled by a third
We have two databases, in two separate locations. One of the databases resides in

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.