title: Error: INVALID_STATE_ERR: DOM Exception 11 breaking my AJAX?
body: <p>Is this error breaking my code? I get it in readystate 1.</p>
  
  <p>Relevant HTML code:</p>
  
  <pre><code>&lt;input type="button" value="Log In" onclick="login()" class="submit" /&gt;
  </code></pre>
  
  <p>Relevant Javascript:</p>
  
  <pre><code>function login() {
          var xmlhttp = new XMLHttpRequest();
          xmlhttp.onreadystatechange = function () {
              if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
                  document.getElementById("headSpan").innerHTML = xmlhttp.responseText;
              }
          }
          xmlhttp.open("POST", "logIn.php", true);
          xmlhttp.send("usr=bob");
      }
  </code></pre>
  
  <p>logIn.php:</p>
  
  <pre><code>&lt;?php
  echo $_POST['usr'];
  ?&gt;
  </code></pre>
  
  <p>Then, xmlhttp.responseText is "". If it's doing what I think it should be, I would get 'bob';</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT</strong>: This error is defined as "If an attempt is made to use an object that is not, or is no longer, usable". Just FYI.</p>