Java Reference
In-Depth Information
else
{
isUsernameTaken = true;
}
}
function checkEmail_callBack(text, xml)
{
if (text == “available”)
{
isEmailTaken = false;
}
else
{
isEmailTaken = true;
}
}
function form_submit()
{
//First check the username
var userValue = $(“username”).value;
if (userValue == “”)
{
alert(“Please enter a user name to check!”);
return false;
}
var options = getBasicOptions();
options.onSuccess = checkUsername_callBack;
new Request(options).send(“username=” + userValue);
if (isUsernameTaken)
{
alert(“The username “ + userValue + “ is not available!”);
return false;
}
//Now check the email
var emailValue = $(“email”).value;
if (emailValue == “”)
{
alert(“Please enter an email address to check!”);
return false;
}
options.onSuccess = checkEmail_callBack;
new Request(options).send(“email=” + emailValue);
if (isEmailTaken)
Search WWH ::




Custom Search