Here is my form.html
<html>
<head>
<script type="text/javascript">
function ajax() {
var aj;
if(window.XMLHttpRequest) {
aj = new XMLHttpRequest();
}
else {
aj = new ActiveXObject("Microsoft.XMLHTTP");
}
aj.onreadystate = function() {
if(aj.ready == 4) {
document.getElementById("text").innerHTML = aj.responseText;
}
};
var param = document.forms["fo"]["text"].value;
aj.open("GET", "try.php" , true);
aj.send();
}
</script>
</head>
<body>
<form name="fo" method="post">
<input type="text" name="text" />
<input type="submit" onsubmit="ajax()" name="submit" />
</form>
<p id="text">
</p>
</body>
</html>
Here is my try.php:
<?php
echo "this this working";
?>
How come i am not getting a responce back ?