EasyCFM.COM ColdFusion Forums / Good Coding Tips! / Validating Email In a CFForm with Actionscript

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Validating Email In a CFForm with Actionscript

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

kicker
06-27-2007 @ 5:22 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 717
Joined: Oct 2004

Just thought I would share this for all those who are using actionscript with cfform. It is an email validation routine that works well.


if (_root.emailadd.text.indexOf(" ") != -1 || _root.emailadd.text.indexOf("@") == -1 || _root.emailadd.text.indexOf(".") == -1 || _root.emailadd.text.length < 6 ) {
               alert("Please check your email address and correct errors in it.","Error");
          } else {
               var email = _root.emailadd.text;
          }





Craig
Clearcg.com


Website Designed and Developed by Pablo Varando.