Java Reference
In-Depth Information
alert(“We're sorry, but “ + userValue + “ is not available.”);
}
}
function checkEmail()
{
var emailValue = document.getElementById(“email”).value;
if (emailValue == “”)
{
alert(“Please enter an email address to check!”);
return;
}
var url = “formvalidator.php?email=” + emailValue;
var request = new HttpRequest(url, checkEmail_callBack);
request.send();
}
function checkEmail_callBack(sResponseText)
{
var emailValue = document.getElementById(“email”).value;
if (sResponseText == “available”)
{
alert(“The email “ + emailValue + “ is currently not in use!”);
}
else
{
alert(“I'm sorry, but “ + emailValue + “ is in use by another user.”);
}
}
</script>
</head>
<body>
<form>
<table>
<tr>
<td class=”fieldname”>
Username:
</td>
<td>
<input type=”text” id=”username” />
</td>
<td>
<a href=”javascript: checkUsername()”>Check Availability</a>
</td>
</tr>
<tr>
<td class=”fieldname”>
Email:
</td>
<td>
Search WWH ::




Custom Search