function parseResults(){ var responseDiv = document.getElementById("odpowiedniDiv"); if(responseDiv.hasChildNodes()){ responseDiv.removeChild(responseDiv.childNodes[0]); } var responseText = document.createTextNode(xmlhttp.responseText); responseDiv.appendChild(responseText); } function handleStateChange(){ if (xmlhttp.readyState == 4){ if(xmlhttp.status == 200){ parseResults(); } } } function send(){ createXMLHttpRequest(); var txt = 'przykadowy tekst'; var url = "postingXML.php?timeStamp=" + new Date().getTime(); xmlhttp.open("POST", url, true); xmlhttp.onreadystatechange = handleStateChange; xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(txt); }
, to znaczy powinien. Skrypt w php powinien go otrzymać i wyświetlić
<?php ?>
więc czemu php zachowuje się tak jaby nic do niego nie dotarło?