// JavaScript Document var xmlHttpfunction; 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 actionAjax(url, responseFunction) { url = "ajax/" + url; var thisdate = new Date(); xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert("ERROR: Could not initialise AJAX"); return; } eval("xmlHttp.onreadystatechange=" + responseFunction + ";"); url = url + "&timecalled=" + thisdate.getTime(); // alert(url); xmlHttp.open("GET",url,true); xmlHttp.send(null); } function actionAjaxPostAbsolute(url, params, responseFunction) { alert(url); alert(params); //alert(params); xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert("ERROR: Could not initialise AJAX"); return; } xmlHttp.open("POST", url, true); //Send the proper header information along with the request xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.setRequestHeader("Content-length", params.length); xmlHttp.setRequestHeader("Connection", "close"); eval("xmlHttp.onreadystatechange=" + responseFunction + ";"); xmlHttp.send(params); }