12. function ajaxFunction(){
var xmlHttp;
try{
// Creating XMLHttpRequest object (Gecko engine, WebKit, Presto, Trident w IE>6)
xmlHttp=new XMLHttpRequest();
} catch(e) {
// Catches exception if JavaScript does not have XMLHttpRequest
try {
// Creating ActiveXObject object, for ActiveX IE console
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
// Creating ActiveXObject object, other versions of IE
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
// Show an error on case of support for XMLHttpRequest
alert("Your browser does not support AJAX!");
return false;
}
}
}
return xmlHttp;
}