tariez
asked on
Check if Email is valid (check for @ symbol) in flash's email input box
Hi
i have a email input box in my flash form. How can i check for the @ sign in this input box before i allow the user to submit?
right now i cant figure how to write this....of coz this doesnt work but can anyone tell me how should i write this?
on (press)
{
if (Email != "@")
{ Status = "please enter a valid email address";
} else {
_root.gotoAndPlay ("submit");
}
i have a email input box in my flash form. How can i check for the @ sign in this input box before i allow the user to submit?
right now i cant figure how to write this....of coz this doesnt work but can anyone tell me how should i write this?
on (press)
{
if (Email != "@")
{ Status = "please enter a valid email address";
} else {
_root.gotoAndPlay ("submit");
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Basically indexOf() function looks for the specified character, @ in this case, and returns the location of that character if found, and returns -1 if @ is not found... That's what I am checking with '< 0'... ;)
tariez,
It's late here. but here is a link to the flash email validtion: http://www.cambodiaxp.com/tutorial/flash-advance/email-validator/email-validation.php
Cheers,
It's late here. but here is a link to the flash email validtion: http://www.cambodiaxp.com/tutorial/flash-advance/email-validator/email-validation.php
Cheers,
ASKER
Hi yup got my answers. thanks!
and sokhodom. yup that url was helpful too. thanks!
and sokhodom. yup that url was helpful too. thanks!
no problem m8 :)
ASKER
i am looking at some flash dictionary, but wonder if u can help me abit more here, wat's "indexOf"?