function initializeAJAXGETRequest(url) { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else if (window.ActiveXObject) { isIE = true; return new ActiveXObject("Microsoft.XMLHTTP"); } } function callajax(url,functionName){ try{ var req = initializeAJAXGETRequest(url); req.onreadystatechange = function() { if (req.readyState == 4){ if (req.status == 200) { //alert(functionName+"(req.responseText)"); if(functionName!=null) eval(functionName+"(req.responseText)"); } else if (req.status == 204){ ;// The empty case } } }; req.open("GET", url, true); req.send(null); }catch(err){ alert('error in Ajax Call..........'); //donothing.. } }