Custom Search

How to we create an XmlHttpRequest object for Internet Explorer? How is this different for other browsers?

For Internet Explorer, an ActiveXObject is used for declaring an XmlHttpRequest object in Javascript.
//Code as below for IE:

xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");

//For Other browsers, code as below:

xmlHttpObject = new XMLHttpRequest();

Note that XmlHttpObject used above is simply a variable that holds the XmlHttpRequest object for the respective browsers.
Your Ad Here