The very first sample in the W3School AJAX tutorial at is not working for me. In this simple example, the time from the server is supposed to appear in the second textbox as I begin to type in the first textbox. Nothing happens at all, though. There are two pages in this example: testAjax.htm and time.asp. Both are hosted in the same folder.

Here is the unaltered code for testAjax.htm:
<script type="text/javascript">
function ajaxFunction()
{ var xmlHttp;
{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); }
catch (e)
{ // Internet Explorer try
{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
catch (e)
{ try
{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
catch (e)
{ alert("Your browser does not support AJAX!"); return false;
<form name="myForm">
Name: <input type="text" onkeyup="ajaxFunction();" name="username" /> Time: <input type="text" name="time" />
Here is the code for time.asp:

If I visit time.asp directly, I get the correct time. If I visit testAjax.htm and begin to type in the name field, nothing happens. I tried it in FF and IE. I'm on Windows 2005 Server, so ASP is not an issue, either. Do I need to make an IIS change for this to work?

Thanks for any help.