imedia,
Сорри не дочитал,
Потренируйся с этим кодом
/index.html
<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<a onclick="ajax('бла бла');">click</a>
<script>
//ie
if (typeof XMLHttpRequest === "undefined") {
XMLHttpRequest = function () {
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
catch (e) {}
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
catch (e) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
throw new Error("This browser does not support XMLHttpRequest.");
};
}
//ie end
function ajax(txt) {
var xhr = new XMLHttpRequest();
xhr.open("GET", '/php.php?m='+encodeURIComponent(txt));
xhr.onreadystatechange = function() {
if(this.readyState == 4)
if(this.status == 200)
{
alert(this.responseText);
}
}
xhr.send('');
}
</script>
</body>
</html>
/php.php
<?
echo $_GET['m']." - получено :)";
?>