title: new XMLHttpRequest in IE9 causes a JScript runtime error: Object doesn't support this property or method
body: <p>happens only in IE9 (in firefox it works fine)
  tried lowering the security settings to minimum.
  i'm not sure about other versions of IE because i have 9 installed.</p>
  
  <p>Environment: asp.net 3.5 webforms
  scripting frameworks: Anthem.NET, jquery</p>
  
  <p>the anthem script is trying to create an instance of XMLHttpRequest and fails
  i tried just create it myself on the page and had the same error.
  on the same project i've created a new html page and it worked fine.</p>
  
  <p>so it might be some scripting collusion...</p>
  
  <p>Anyone?</p>
  
  <p>Here is the original code that fails (on line 3) taken from the Anthem.NET framework that runs on the system:</p>
  
  <pre><code>function Anthem_GetXMLHttpRequest() {
  if (window.XMLHttpRequest) {  // &lt;-- This passes as True! window.XMLHttpRequest is {...}
      return new XMLHttpRequest(); // &lt;---- Fails here
  } else {
      if (window.Anthem_XMLHttpRequestProgID) {
          return new ActiveXObject(window.Anthem_XMLHttpRequestProgID);
      } else {
          var progIDs = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
          for (var i = 0; i &lt; progIDs.length; ++i) {
              var progID = progIDs[i];
              try {
                  var x = new ActiveXObject(progID);
                  window.Anthem_XMLHttpRequestProgID = progID;
                  return x;
              } catch (e) {
              }
          }
      }
  }
  return null;
  </code></pre>
  
  <p>}</p>
  
  <p>here's the Window.XMLHttpRequest value:
  <img src="https://i.stack.imgur.com/zz7x9.jpg" alt="enter image description here"></p>
  
  <p>and here is a picture of the failure that i created myself:
  <img src="https://i.stack.imgur.com/3AYSt.jpg" alt="enter image description here"></p>
  
  <p><strong>Update:</strong>
  Just found out that it works in Compatibility Mode ! and when i go back to normal mode it works again!
  BTW: the document mode is on Quirks mode (which is the default)</p>