var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
id = encodeURIComponent(id);
xmlhttp.open('POST', '/aplication/ajax/poll.php', true);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4) {
if(xmlhttp.status == 200) {
alert(xmlhttp.responseText);
}
}
};
xmlhttp.send("id=gb");
В /aplication/ajax/poll.php' пишу:
echo $_POST['id'];
echo "<br />";
<br /> вывело, а gb нет. Почему?