Here's the issue,
at testing.html
<body>
<script type="text/javascript">
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == XMLHttpRequest.DONE) {
if (xmlhttp.status == 200) {
//eval(xmlhttp.responseText);
console.log(xmlhttp.responseText);
alert(xmlhttp.responseText);
}
}
};
xmlhttp.open("POST", "ajax.php", true);
xmlhttp.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
</script>
<div id="debug1">a</div>
</body>
at ajax.php
echo " document.getElementById('debug1').innerHTML = '987';";
I want to be able to print out the thing at client side for debugging, without touching the php.
In this case, I want to be able to see the document.getElement whole code at console.
I changed it from eval to console.log / alert, but only can see empty output...
any way to debug this?