Java Reference
In-Depth Information
parms.username = userValue;
var options = getBasicOptions();
options.onSuccess = checkUsername_callBack;
options.parameters = parms;
new Ajax.Request(“formvalidator.php”, options);
}
function checkUsername_callBack(request)
{
var userValue = $F(“username”);
if (request.responseText == “available”)
{
alert(“The username “ + userValue + “ is available!”);
}
else
{
alert(“We're sorry, but “ + userValue + “ is not available.”);
}
}
function checkEmail()
{
var emailValue = $F(“email”);
if (emailValue == “”)
{
alert(“Please enter an email address to check!”);
return;
}
var parms = new Object();
parms.email = emailValue;
var options = getBasicOptions();
options.onSuccess = checkEmail_callBack;
options.parameters = parms;
new Ajax.Request(“formvalidator.php”, options);
}
function checkEmail_callBack(request)
{
var emailValue = $F(“email”);
if (request.responseText == “available”)
{
alert(“The email “ + emailValue + “ is currently not in use!”);
}
else
{
Search WWH ::




Custom Search