title: XMLHttpRequest readyState is equal to 0
body: <p>I can't get any data with XMLHttpRequest, because its readyState returns 0. I have this code:</p>
  
  <pre><code>function chargerArrondissements() {
      var xhrArrond = new XMLHttpRequest();
      xhrArrond.onreadystatechange = chargerArrondCallback(xhrArrond);
      var lienDocArrond = 'PHP/script_load_arrondissements_get.php';
      xhrArrond.open('GET', lienDocArrond, true);
      console.log('Arrondissements chargés dans le fichier xml');
      xhrArrond.send(null);
  }
  
  function chargerArrondCallback(xhrArrond) {
      alert(xhrArrond.readyState);
  }
  </code></pre>
  
  <p>The alert window shows 0. I also tried opening the XHR before setting the handler, but it still return 0. Now, the strange thing is that I have many XHRs on that page, and they all work very well, except that one, and I can't explain why. </p>
  
  <p>Btw, my php file path is: <code>http://localhost/TP2/PHP/script_load_arrondissements_get.php</code> .</p>
  
  <p>Also, you should know that this file returns a correct xml content.</p>
  
  <p>This is what the console says about my request:
  <img src="https://i.stack.imgur.com/e9vxR.png" alt="enter image description here"></p>
  
  <p>Anyone knows what could be the problem? Thanks.</p>