Friday, November 14, 2008

AJAX Object

The keystone of AJAX is the XMLHttpRequest object.
Different browsers use different methods to create the XMLHttpRequest object.
Internet Explorer uses an ActiveXObject, while other browsers uses the built-in JavaScript object called XMLHttpRequest.
Other Browsers:
----------------
var xmlHttp;xmlHttp=new XMLHttpRequest();
Internet Explorer
------------------
var xmlHttp;
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); //IE 6.0+(or)
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");//IE 5.5+

No comments: