KyaPoocha.com

Huge Collection of Interview Questions


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.



If you liked this question/asnwer, make sure you
Subscribe to KyaPoocha.com RSS feed!


BOOKMARK THIS : BlinkList | del.icio.us | Digg it | Furl | reddit | StumbleUpon | Yahoo MyWeb |