diff options
author | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 13:38:08 -0500 |
---|---|---|
committer | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 13:38:08 -0500 |
commit | be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c (patch) | |
tree | 6f20672cf5df66044b3fa9dd71fc3bcdc484abe6 /ajax/simple_form/index.htm | |
parent | 1a619f2638a4f77fb8ea9557edeefb883d8c06f8 (diff) | |
download | bayonetcms-be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c.tar.gz |
Test.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@376 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'ajax/simple_form/index.htm')
-rw-r--r-- | ajax/simple_form/index.htm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ajax/simple_form/index.htm b/ajax/simple_form/index.htm new file mode 100644 index 0000000..2c01922 --- /dev/null +++ b/ajax/simple_form/index.htm @@ -0,0 +1,36 @@ +<html> +<body> + +<script type="text/javascript"> +function ajaxFunction() +{ +var xmlhttp; +if (window.XMLHttpRequest) + { + // code for IE7+, Firefox, Chrome, Opera, Safari + xmlhttp=new XMLHttpRequest(); + } +else + { + // code for IE6, IE5 + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } +xmlhttp.onreadystatechange=function() +{ +if(xmlhttp.readyState==4) + { + document.myForm.time.value=xmlhttp.responseText; + } +} +xmlhttp.open("GET","time.php",true); +xmlhttp.send(null); +} +</script> + +<form name="myForm"> +Name: <input type="text" name="username" onkeyup="ajaxFunction();" /> +Time: <input type="text" name="time" /> +</form> + +</body> +</html>
\ No newline at end of file |