ไฟล์ test1.php ***
<script language="javascript" type="text/javascript">
function doChange(){
var rows=document.getElementById("rows").value;
var cols=document.getElementById("cols").value;
if (rows==null || rows=="" || cols==null || cols=="") return ;
//Create Url to connect to server
var url="test2.php?rows="+rows+"&cols="+cols;
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
xmlhttp.open('GET',url,false); //GET
xmlhttp.send();
str=xmlhttp.responseText;
document.getElementById("output").innerHTML="<b>"+ str+"</b>";
}
</script>