Dodanie dwóch oddzielnych wyników ajax post rquest razem
Mam dwa oddzielne żądania Ajax Post, które muszę dodać razem, oba łączą się z kanałem wymiany walut, w zasadzie dwie wartości, które są konwertowane z różnych walut, a następnie muszą zostać dodane razem po tym, jak obie zostaną zamienione na jedną walutę, ive zdobyć je obie w tej samej walucie, nie muszę po prostu dodać dwóch wyników razem, aby uzyskać ostateczną sumę.
Oto dwa wnioski
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
}
});
wszelka pomoc w ogóle będzie bardzo doceniana .. Dzięki :)