2
我有两个单独的Ajax Post请求,我需要将它们加在一起,它们都链接到货币兑换Feed,其基本上是从不同货币转换而来的两个值,然后需要在两种货币都被转换成一种货币后加在一起,我得到了他们两种货币的相同货币,我只需要把这两个结果加在一起得到最终的总和。将两个单独的ajax Post rquest结果加在一起
这里有两个请求
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
}
});
任何帮助都将大大apreciated ..谢谢:)
有趣的方法,repped +1 – TheBlackBenzKid
嘿谢谢,90%的方式,它的工作原理,我只需要现在将两个Response值一起添加?任何想法...“601,150.9,成功,[对象对象]”即时通讯即时获得。我只需要数字,那个值 –
@Dawid van der Hoven:我们不知道你回来了什么,以及你现在的代码是什么(这会返回你所显示的) – zerkms