Took a little testing, but here is a working copy of the javascript (which seemed to be the only problem). The snippet is below.
The main problems were the xmlHttp object needed to be created and the rest was case sensitivity issues.
Let me know if this works for you. =)
Code:
function checkUsername(str)
{
var url = "username.asp";
url = url + "?username=" + str;
try {
xmlHttp = window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
// browser doesn't support ajax. handle however you want
}
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
{
document.getElementById("response").innerHTML = xmlHttp.responseText;
}
}