<script language = “javascript” type = “text/javascript”>
function ajaxFunction(){
var ajaxRequest;
ajaxRequest = new XMLHttpRequest();
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById(‘ajaxDiv’);
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
var age = document.getElementById(‘age’).value;
var wpm = document.getElementById(‘wpm’).value;
var sex = document.getElementById(‘sex’).value;
var queryString = “?age=” + age ;

queryString +=  “&wpm=” + wpm + “&sex=” + sex;
ajaxRequest.open(“GET”, “gethint.php” + queryString, true);
ajaxRequest.send(null);
}
</script>

Leave a reply