//the agent we are calling to create the log doc var AjaxLogAgent='/PandiOnline/WebAppsStatsLog.nsf/AjaxDoLog?OpenAgent&q='; var WebLogxmlHttp; var cache = new Object(); var searching = false; //create ActiveXObject function getXMLHTTP4WebLog(){ var A = null; if (window.XMLHttpRequest) // if Mozilla, Safari etc A= new XMLHttpRequest() else if (window.ActiveXObject){ // if IE try { A = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ A = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){ A = null; } } } return A; } //This function is called from HTML Frag function doWebClientLog(queryString) { //alert("centhtml docRemoteQuery called"); searching = true; if(WebLogxmlHttp ) { if (WebLogxmlHttp.readyState != 0) { WebLogxmlHttp.abort() } } //alert("about to call getXMLHTTP4WebLog"); WebLogxmlHttp=getXMLHTTP4WebLog(); if(WebLogxmlHttp){ //alert("about to open querystring " + AjaxLogAgent + queryString); WebLogxmlHttp.open("GET", AjaxLogAgent + queryString, true); // What do we do when the response comes back? WebLogxmlHttp.onreadystatechange = function() { if (WebLogxmlHttp.readyState == 4 && WebLogxmlHttp.responseText) { //since we are only interested about creating the doc, so don't eval the AjaxReponseDummy function // eval(WebLogxmlHttp.responseText); searching = false; } } ; WebLogxmlHttp.send(null); } } //this function is for testing use only, AjaxReponseDummy is the function WebLogxmlHttp.responseText will be returned by ls agent function AjaxReponseDummy(sResponse) { alert(sResponse); }