I have an AJAX code that update a PHP page and I want to hide the AJAX code so the users when view source of the page don't show for them the AJAX code so How can I do it? This is my AJAX code
<script type="text/javascript">
function Ajax(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("Oops!");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText;
setTimeout('Ajax()',2000);
}
}
xmlHttp.open("GET","reload.php",true);
xmlHttp.send(null);
}
window.onload=function(){
setTimeout('Ajax()',2000);
}
</script>
So how cna I hide this code from view source?