title: onreadystatechange undefined error
body: <p>For over an hour now, I have been trying to debug my code but no dice. I realize that the asynchronous call of ajax means I have to make use of the callback function with the onreadystatechange event. The thing is, I keep getting the "Uncaught TypeError: undefined is not a function xmlhttp.onreadystatechange" message in my console. What is wrong with my code? I am following the template on <a href="http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_suggest_php" rel="nofollow">http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_suggest_php</a> and I see no difference. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.onload = function() {
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function(){
     if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
      var obj = JSON.parse(xmlhttp.responseText);
      document.getElementbyId("table").innerHTML = "Test";
     }
    }
    xmlhttp.open("GET", "bookstore.php?filename=bookstore.json", true);
    xmlhttp.send();
     }</code></pre>
  </div>
  </div>
  </p>