title: xmlhttp.open("GET","ajax_info.txt",true): What am I missing?
body: <p>According to w3schools.com the open method of the XMLHttpRequest object takes three parameters:
  1. method
  2. url
  3. a boolean indicating whether the call is asynchronous or not</p>
  <p>One of the examples used a text file for the url parameter. I copied the code and replaced the text file with my own and nothing happened. What am I missing?</p>
  <p>This is the code I copied:</p>
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;script&gt;
      function loadXMLDoc(){
          var xmlhttp;
          if (window.XMLHttpRequest){
          // code for IE7+, Firefox, Chrome, Opera, Safari
               xmlhttp=new XMLHttpRequest();
          }
          else{
          // code for IE6, IE5
               xmlhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
          }
               xmlhttp.onreadystatechange=function(){
          if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){
              document.getElementById(&quot;myDiv&quot;).innerHTML=xmlhttp.responseText;
          }
       }
      xmlhttp.open(&quot;GET&quot;,&quot;ajax_info.txt&quot;,true);
      xmlhttp.send();
      }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
      &lt;div id=&quot;myDiv&quot;&gt;&lt;h2&gt;Let AJAX change this text&lt;/h2&gt;&lt;/div&gt;
      &lt;button type=&quot;button&quot; onclick=&quot;loadXMLDoc()&quot;&gt;Change Content&lt;/button&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>