26/09/2005, 15:51
|
| | Fecha de Ingreso: septiembre-2005
Mensajes: 11
Antigüedad: 19 años, 2 meses Puntos: 0 | |
ante todo muchas gracias
here it is:
Código:
var req;
function initRequest(url) {
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
req = new ActiveXObject("Microsoft.XMLHTTP");
}
}
function calculateResult() {
var url = "lib/ajax.php?material=" + document.getElementById("materialid")+
"&size="+ document.getElementById("sizeid")+
"&side1Colour="+ document.getElementById("side1Colourid")+
"&side2Colour="+ document.getElementById("side2Colourid")+
"&SPS="+ document.getElementById("SPSid")+
"&finishing="+ document.getElementById("finishingid")+
"&frontCover="+ document.getElementById("frontCoverid")+
"&backCover="+ document.getElementById("backCoverid")+
"&sets="+ document.getElementById("setsid");
initRequest(url);
req.onreadystatechange = processRequest;
req.open("GET", url, true);
req.send(null);
}
function processRequest() {
if (req.readyState == 4) {
if (req.status == 200) {
//document.getElementById("resultid").innerHTML = req.responseXML.getElementsByTagName("price")[0].childNodes[0].nodeValue;
alert('aa');
alert(req.responseXML.getElementsByTagName('price')[0].item(0).nodeValue);
//alert(req.responseXML.getElementsByTagName('price')[0].firstChild);
}
}
}
|