title: Redy state object null or undefined for simple ajax
body: <p>I have created a very simple program for AJAX object creation.</p>
  
  <pre><code>&lt;script&gt;
  function fun1(){
  
  if(navigator.appName=="Microsoft Internet Explorar")
  {
  obj=new ActiveXObject("Msxml2.xmlhttp");
  }
  else
  {
  obj= new XMLHttpRequest();
  }
  
  obj.open("post","page1.php",true);
  obj.send();
  alert (obj.redyState);
  obj.onredystatechange=function () {
  alert ("hi");
  if(obj.readyState==4)
  alert("hi1");
  }
  
  }
  
  &lt;/script&gt;
  
  &lt;button onclick="fun1()"&gt;click&lt;/button&gt;
  </code></pre>
  
  <p>But alert message within the function are not displaying.</p>
  
  <p>And "alert (obj.redyState);" shows [undefined] as output on IE and blank message box in Firefox.</p>
  
  <p>What may be the issue?</p>