title: XMLHttpRequest not working
body: <p>The following code I am using to dynamically update the TextArea element in my HTML every 2 seconds without reloading the page. However, the <code>alert(request.readystate)</code> is returning undefined instead of a number 1-4. When I tried <code>if(request) alert("Request object")</code> it alerts the user "Request object" as expected. I have no clue why this isn't working and I have been trying to figure this out for hours!</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function init(){
        var url="http://www.suchandsuch.net/ChatBowl/text.txt";
        var request= new XMLHttpRequest();
        request.open("POST",url,true);
        alert(request.readystate);
        request.onload= function(){
          if (request.readystate ==4 &amp;&amp; request.status == 200){
            document.getElementById('textarea').innerHTML=request.responseText;
          }  
        }
          request.send(null);
  
       }
  
  
      var int=self. setInterval('init()', 2000);
  
    &lt;/script&gt; 
  </code></pre>
  
  <p>I appreciated any help.</p>