Simple AJAX script
function ajaxFunction(x)
{
var xmlHttp;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
}
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
alert(xmlHttp.responseText);
}
xmlHttp.send(null);
var url="http://localhost/sajjad/ajax.php"+"?q="+document.compose.recv.value;
xmlHttp.open("GET",url,true);
}