topical media & game development
basic-xml-15-listing15.txt / txt
<script language="JavaScript">
function updateTotal(){
var qty = orderForm.qty.value;
var unitPrice = orderForm.unitPrice.value;
xdDoc = new ActiveXObject("MSXML.DOMDocument");
xhHTTP = new ActiveXObject("MSXML2.XMLHTTP");
xhHTTP.open("GET", "http://192.168.1.100/soap/updateTotal2.asp?quantity="
+ qty + "&unitPrice=" + unitPrice, false);
xhHTTP.send();
xdDoc = xhHTTP.responseXML;
var discount, extPrice;
discount = xdDoc.selectSingleNode("//o:discount").text + "% off";
extPrice = xdDoc.selectSingleNode("//o:extPrice").text;
document.getElementById("discount").innerHTML = discount;
orderForm.extPrice.value = extPrice;
}
</script>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.