title: Javascript - XMLHttpRequest failing in Internet Explorer
body: <p><strong>* SOLVED *</strong> Answer is in separate post below</p>
  
  <p>This code runs fine in FireFox but it will not run in Internet Explorer 8. It gives me the error of "access denied. Is there something I am missing?</p>
  
  <pre><code>function loadXMLDoc(dname){
      if (window.XMLHttpRequest){
          var xhttp=new XMLHttpRequest();
      }
      else{
          var xhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      xhttp.open("GET", dname,false);
      xhttp.send();
      return xhttp.responseXML;
  }
  var xmlDoc=loadXMLDoc("notSchema.xml");
  var x=xmlDoc.getElementsByTagName('ROOT_NODE_ID');
  </code></pre>
  
  <p>It specifically doesn't like the .open() and the .send()</p>
  
  <p>Edited...</p>
  
  <pre><code>var x;
  
  function loadXMLDoc(dname){
  var request = $.ajax({
      url: dname,
      type: "GET",
      async: false,
      data: {},
      success: function(http){
          xmlDoc = http;
          alert(http);
          x=http.getElementsByTagName("ROOT_NODE_ID");
      },
      error: function(html){
          alert('failure: ' + html);
      }       
  });
  
  }
  
  loadXMLDoc("notSchema.xml");
  
  for (var i=0;i&lt;x.length;i++)
  {
  
  if(x[i].childNodes[0] == undefined) {
      treeArray[count]="null";
      count++;
  }else{
      //return ROOT_NODE_ID
  
      treeArray[count]=x[i].childNodes[0].nodeValue;
      count++;
  }
  }
  </code></pre>
  
  <p>Edited the Code once again. What I'm trying to do is load the XML, parse for the tag "ROOT_NODE_ID" and then get that value and store it into an array</p>
  
  <p>When I run that code in firefox, it returns 51, which is the number of ROOT_NODE_ID tags and fills the tree that I am making.
  When I run the same exact code in IE8, it does not even alert.</p>
  
  <p>I'm Stumped.</p>