26Jan/111
Clasic Ajax Script
The Simple Ajax Script is:
function getXmlHttpReq(){
var req;
if(window.XMLHttpRequest && !(window.ActiveXObject)) {
try{
req = new XMLHttpRequest();
}
catch(e){
req = false;
}
// branch for IE/Windows ActiveX version
}
else if(window.ActiveXObject) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e) {
req = false;
}
}
}
return req;
}
January 26th, 2011 - 22:46
Yes, its the classic javascript for ajax operation. It is easy to use. But now jquery is most valuable library for ajax.