topical media & game development

talk show tell print

basic-xml-15-listing13.htm / htm



  <html>
  <head>
     <title>GET Tester</title>
  
  <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://localhost/soap/updateTotal2.asp?quantity=" 
                              + qty + "&unitPrice=" + unitPrice, false);
      xhHTTP.send();
      xdDoc = xhHTTP.responseXML;
  
      alert(xdDoc.xml);
  }
  </script>
  </head>
  <body>
  
  <h1>SOAP Pricing Tool</h1>
  
  <form name="orderForm" id="orderForm">
     
    Quantity: <input id="qty" name="qty" size="3" value="1" 
                                      onChange="updateTotal();"/>
    <br />
    Item: <i>Zibka Smiles</i>, by The Polka Dot Zither Band 
    <br />
    Discount: <span id="discount"></span>
    <br />
    Unit Price: <input id="unitPrice" name="unitPrice" value="12.95" size="4"/>
    <br />
    Extended Price: <input id="extPrice" name="extPrice" size="4" value="12.95" />
  
  </form>
  
  </body>
  </html>
  


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