Hi!I've got huge problem with IE and AJAX.That's my script:
Code:
<html>
<head>
<title></title>
<script type="text/javascript">
var xmlHttp;

function go()
 { 
alert('go()');
 xmlHttp=GetXmlHttpObject();
 if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 
 var url="1.xml";
alert('before stateChanged');
xmlHttp.onreadystatechange=stateChanged;
try{xmlHttp.open("GET",url,true);}catch(e){alert('alert in xmlHttp.open:'+e);}
 xmlHttp.send(null);

alert('end');
 }

function stateChanged() 
{ try{
if (xmlHttp.readyState==4 || xmlHttp.readyState==200)
{
  alert('stateChanged() ');
 xmlDoc=xmlHttp.responseXML;
 document.getElementById("a1").innerHTML=
 xmlDoc.getElementsByTagName("part")[0].childNodes[0].nodeValue;
}}catch(e){alert('alert in stateChanged:'+e);}
}

function GetXmlHttpObject()
 { 
 var objXMLHttp=null;
 if (window.XMLHttpRequest)
  {
  alert('window.XMLHttpRequest');
  objXMLHttp=new XMLHttpRequest();
alert(objXMLHttp);
  }
 else if (window.ActiveXObject)
  {
  alert('window.ActiveXObject');
  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 return objXMLHttp;
 }
</script>
</head>
<body>
<button onClick="go()">go</button>
<div id="a1"></div>
</body>
</html>
I've got that:
alert in xmlHttp.open:[object Error] (first catch)
I do it that way:
Code:
<html>
<head>
<title></title>
<script type="text/javascript">
var xmlHttp;

function go()
 { 
alert('go()');
 xmlHttp=GetXmlHttpObject();
 if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 
 var url="1.xml";
alert('before stateChanged');
xmlHttp.onreadystatechange=stateChanged;
try{xmlHttp.open("GET",url,true);}catch(e){alert('alert in xmlHttp.open:'+e);}
 xmlHttp.send(null);

alert('end');
 }

function stateChanged() 
{ try{
if (xmlHttp.readyState==4 || xmlHttp.readyState==200)
{
  alert('stateChanged() ');
 xmlDoc=xmlHttp.responseXML;
 document.getElementById("a1").innerHTML=
 xmlDoc.getElementsByTagName("part")[0].childNodes[0].nodeValue;
}}catch(e){alert('alert in stateChanged:'+e);}
}

function GetXmlHttpObject()
 { 
 var objXMLHttp=null;
 if(navigator.appName == "Microsoft Internet Explorer")
 {
 alert('IE');
 objXMLHttp = new ActiveXObject("MSXML2.XMLHTTP.3.0");
 alert(objXMLHttp);
 }
 else
 {
  alert('non IE');
  objXMLHttp=new XMLHttpRequest();
 alert(objXMLHttp);
 }

 return objXMLHttp;
 }
</script>
</head>
<body>
<button onClick="go()">go</button>
<div id="a1"></div>
</body>
</html>
And IE shows me that:
alert in stateChanged:[object Error] (second catch)
......
What's so wrong?PLS help me!

p.s. the xml file is:
Code:
<?xml version="1.0" encoding="Windows-1251"?><siteData><part>Introduction!</part></siteData>