// JavaScript Document // JavaScript Document function sendcr(table,tableid,field,newvalue,reason,isencoded) { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { // } } var rn=Math.floor(Math.random()*9999); xmlHttp.open("POST","ajax/addcr.php",true); var params="rn="+rn+"&cr_table="+table+"&cr_tableid="+tableid+"&cr_field="+field+"&cr_new="+newvalue+"&cr_reason="+reason+"&isencoded="+isencoded; //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"); xmlHttp.send(params); }