function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function SearchRequestLog(tool_code, search_string, search_type, search_by) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { // alert ("Your browser does not support AJAX!"); return; } var url="/wp-content/systemplugins/hkec-log/log-handler.php"; url=url+"?actionID=SEARCH_REQUEST"; url=url+"&tool_code="+encodeURI(tool_code); url=url+"&search_string="+encodeURI(search_string); url=url+"&search_type="+encodeURI(search_type); url=url+"&search_by="+encodeURI(search_by); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) { //alert(xmlHttp.responseText); } } // alert (url); xmlHttp.open("GET",url,false); xmlHttp.send(null); }