ksa,
может js библиотека корявая?
function getXmlHttp() {
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();
}
return xmlhttp;
}
var xmlhttp = getXmlHttp();
xmlhttp.open("POST", "/index.php?option=com_ajax&module=AjaxTest&format=json&task=cards", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send("game=" + encodeURIComponent(document.getElementById("namegame").value));
xmlhttp.onreadystatechange = function() {
if(xmlhttp.status == 200) {
document.getElementById("tradecards").innerHTML = xmlhttp.responseText;
}
}
такой кот работает исправно