topical media & game development

talk show tell print

basic-xml-14-listing15.htm / htm

        <title>GET Tester</title>
    <script language="JavaScript">
  function doGet()
      var xdDoc, xhHTTP, sXML
      var keyword = searchForm.keyword.value;
      sRequest = ""+
      xdDoc = new ActiveXObject("MSXML.DOMDocument");
      xhHTTP = new ActiveXObject("MSXML2.XMLHTTP");"GET", sRequest, false);
      xdDoc = xhHTTP.responseXML;
      numResults = xdDoc.selectSingleNode("/ProductInfo/TotalResults").text;
      alert("Amazon lists "+numResults+" books on "+keyword+".");
      <form name="searchForm" id="searchForm">
          What topic would you like to research? <br />
          <input id="keyword" name="keyword" size="45">
        <input type="button" value="Send The Request" onclick="doGet()">

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