topical media & game development

talk show tell print

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");"GET", "" 
                      + qty + "&unitPrice=" + unitPrice, false);
      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;

(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.