Hi all,
I am sure this is very common task I can't get it right.
I want to make sure user inputs in 2 text boxes "tbxEmailAddres s" and "tbxEmailAddres s2" are the same. I have the following code
[code=php]
cEmailAddress = tbxEmailAddress ;
cEmailAddress2 = tbxEmailAddress 2;
}else if (!trim(cEmailAd dress.value) == trim(cEmailAddr ess2.value))
{
alert("Please enter the same email address");
cEmailAddress.f ocus();
return false;
}else if (something else)
[/code]
Problem is this test does nothing even though I know the 2 fields are different.
I want to do this check on the client side.
Can any one help??
Denis
I am sure this is very common task I can't get it right.
I want to make sure user inputs in 2 text boxes "tbxEmailAddres s" and "tbxEmailAddres s2" are the same. I have the following code
[code=php]
cEmailAddress = tbxEmailAddress ;
cEmailAddress2 = tbxEmailAddress 2;
}else if (!trim(cEmailAd dress.value) == trim(cEmailAddr ess2.value))
{
alert("Please enter the same email address");
cEmailAddress.f ocus();
return false;
}else if (something else)
[/code]
Problem is this test does nothing even though I know the 2 fields are different.
I want to do this check on the client side.
Can any one help??
Denis
Comment