Ajax is stand for Asynchronous Javascript and XML.
The question is what kind of javascript’s object that has been use for making Ajax object ? as we know that outside, there is a lot of Ajax object that has been made. Like MagicAjax, Atlas, etc.
The answer is HttpObject in javascript. The existing HttpObject until now is XMLHttpRequest, “MSXML2.XMLHTTP” activeXobject, “Microsoft.XMLHTTP” activeXobject.
Example :
function GetHttpObject()
{
var xmlhttp;
if (window.XMLHttpRequest)
{
try{xmlhttp = new XMLHttpRequest();}
catch (e){ xmlhttp = false;}
}
else if (window.ActiveXObject)
{
var clsids = ["MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
for(var i=0; i<clsids.length; i++)
{
try{xmlhttp = new ActiveXObject(clsids[i]);break;}
catch (e){xmlhttp = false;}
}
}
return xmlhttp;
}