Try using the following code:
Code:
function getXmlHttpRequestObject()
{
if (window.XMLHttpRequest)
{
return new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
try
{
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
else
{
alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
return null;
}
}
It has one additional object for new IE browsers. Please let us know what happened. Also give the details of your browser (brand and version) and the error you encounter.