var ajaxReq; var infoMsg; function createAJAXRequest(fromURL, respFunction ) { // init infoMsg = null; if (window. ActiveXObject) { // Internet Explorer ajaxReq = new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest) { // Firefox, Mozilla, etc. ajaxReq = new XMLHttpRequest(); } // to prevent IE from cache //fromURL = fromURL + "rnd="+(new Date()).getTime() + "&" ; //statusMsg( "Ajax: URL='" + fromURL + "'"); ajaxReq.open("GET", fromURL, true) // another approach to IE cache problem // ajaxReq.setRequestHeader('If-Modified-Since', 'Mon, 1 Jan 1900 00:00:00 GMT'); // ajaxReq.setRequestHeader("IF-MODIFIED-SINCE","Sat, 04 Feb 2006 17:47:00 PST"); ajaxReq.setRequestHeader("IF-MODIFIED-SINCE","Mon, 1 Jan 1900 00:00:00 GMT"); ajaxReq.onreadystatechange = eval(respFunction); ajaxReq.send( null); }