<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script type="text/javascript">
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('Msxml2.XMLHTTP') } catch (e) { }
try { return new ActiveXObject('Microsoft.XMLHTTP') } catch (e) { }
}
}
var url='tadam.php'
function dophp(what)
{
var http=new XMLHttpRequest()
http.open('GET',url+'?text='+escape(what.value),false)
http.send(null)
if (http.readyState==4 && http.status==200) {
alert('PHP\'s message to JavaScript :\n\n'+http.responseText)
}
}
</script>
</head>
<body>
<form name="form1" action="" method="post">
<p>
<input type="button" name="mybutton" value="One" onclick="dophp(this)">
<input type="button" name="mybutton" value="Two" onclick="dophp(this)">
<input type="button" name="mybutton" value="Three" onclick="dophp(this)">
</p>
</form>
</body>
</html>