app not run on ie6
hi all
im new to ajax n jus for learning i develop ajax app with asp.net.
the application run fine in firefox but not in ie6 and app doesnot show any error
following is the code:
var xmlHttp;
function showavailability(username)
{
xmlHttp=CreateXmlReq();
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url="checkid.aspx?username="+username;
xmlHttp.onreadystatechange=stateChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtHint").innerHTML=xmlHt tp.responseText ;
}
}
function CreateXmlReq()
{
try
{
XmlReq = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
XmlReq = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(oc)
{
XmlReq = null;
}
}
if(!XmlReq && typeof XMLHttpRequest != "undefined")
{
XmlReq = new XMLHttpRequest();
}
return XmlReq;
}
so plz let me know where is the problem.
thanks n with regards
Nm
|