title: Using XMLHttpRequest in a Google Chrome extension
body: <p>I started making this simple google chrome extension in javascript. And in the beginning of the code I have the following: </p>
  
  <pre><code>var req = new XMLHttpRequest();
  
  req.open(
      "GET",
      "http://www.ldoceonline.com/dictionary/manga",
      true);
  
  req.onreadystatechange(alert(req.readyState));
  </code></pre>
  
  <p>The value req.readyState comes to be 1, which means the required page has not been properly fetched. I'm a newbie to Javascript. What's the problem in my code?</p>