bedomon Posted January 17, 2006 Share Posted January 17, 2006 hi allI have this script to check if the email is valid but it don't work :var arobase = document.formulaire.indexOf("@");var point = document.formulaire.lastIndexOf(".");var espace = document.formulaire.indexOf(" "); if (!((arobase != -1) && (arobase != 0) && (point != -1) && (point > arobase +1) && (point < document.formulaire.getElementById("eMail").length - 1) && (espace == -1))) { return false; } Link to comment Share on other sites More sharing options...
bedomon Posted January 17, 2006 Author Share Posted January 17, 2006 nobody can help me...? Link to comment Share on other sites More sharing options...
chadmichael Posted January 17, 2006 Share Posted January 17, 2006 What is the formulaire?Is that your form name? Link to comment Share on other sites More sharing options...
bedomon Posted January 18, 2006 Author Share Posted January 18, 2006 yes : formulaire = my form nameIs my script good???? Link to comment Share on other sites More sharing options...
Chocolate570 Posted January 18, 2006 Share Posted January 18, 2006 Try using this script.http://dynamicdrive.com/dynamicindex16/emailvalidate.htm Link to comment Share on other sites More sharing options...
chadmichael Posted January 18, 2006 Share Posted January 18, 2006 In your script, you are trying to execute the string methods on the form object itself. Link to comment Share on other sites More sharing options...
aspnetguy Posted January 18, 2006 Share Posted January 18, 2006 You need to execute on the fields within the formdocument.formname.fieldname.indexOf() not document.formname.indexOf() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now