function cofDoOrderBook() {
var name = $('#name').val();
var tel = $('#con').val();
var degree = $('#class').val();
var codeposti = $('#pc').val();
var cityPrice = $('#city').val();
var address = $('#add').val();
var num = $('#num').val();
var tprice = (num * ('29000' + cityPrice));
var email = $('#email').val();
$.ajax({
type: "POST",
url: "hpajax.php?do=orderBook",
data: "name="+name+"&tel="+tel+"°ree="+degree+"&pcode="+codeposti+"&cityPrice="+cityPrice+"&address="+address+"&num="+num+"&tprice="+tprice+"&email="+email,
}).done(function(data) {
//alert(data);
xmlDoc = $.parseXML(data);
$xml = $(xmlDoc);
$oid = $xml.find("oid");
$trackcode = $xml.find("trackcode");
$tprice = $xml.find("tprice");
oid = $oid.text();
trackcode = $trackcode.text();
tprice = $tprice.text();
alert(tprice);
});
}
now I don't know my problemalso I test this code
function cofDoOrderBook() {
var name = $('#name').val();
var tel = $('#con').val();
var degree = $('#class').val();
var codeposti = $('#pc').val();
var cityPrice = $('#city').val();
var address = $('#add').val();
var num = $('#num').val();
var tprice = (num * (29000 + cityPrice));
var email = $('#email').val();
$.ajax({
type: "POST",
url: "hpajax.php?do=orderBook",
data: "name="+name+"&tel="+tel+"°ree="+degree+"&pcode="+codeposti+"&cityPrice="+cityPrice+"&address="+address+"&num="+num+"&tprice="+tprice+"&email="+email,
}).done(function(xmlData) {
xmlDoc = $.parseXML(xmlData),
$xml = $(xmlDoc),
$s = $xml.find("s");
$oid = $xml.find("oid");
$trackcode = $xml.find("trackcode");
$tprice = $xml.find("tprice");
s = $s.text();
oid = $oid.text();
trackcode = $trackcode.text();
tprice = $tprice.text();
alert(tprice);
});
}
Note:ajax function works fine!:bad:


Sign In
Create Account


Back to top









