AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help in validating the period in an email address. (new

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Sue
Guest





PostPosted: Mon Nov 24, 2003 3:39 am    Post subject: Need help in validating the period in an email address. (new Reply with quote



I am a new Java student and would appreciate a little help.

What I need is to be able to validate the period as the fourth from
the last character in an email address and return focus if the address
is invalid. The best I have been able to do is a good address on the
first attempt. If an incorrect address is entered first I am unable to
get it to accept a good address from then on. The code below is what I
have left after removing everything that did not work.

Is there anyone here that can provide some assistance. Thanks




// validate the e-mail
var RegeMail=document.Register.eMail.value
var atSign = RegeMail.indexOf("@")
if (RegeMail == " " || atSign == -1) {
alert("Please enter your e-mail address")
document.Register.eMail.value = " "
document.Register.eMail.focus()
}
Back to top
Erwin Moller
Guest





PostPosted: Mon Nov 24, 2003 9:44 am    Post subject: Re: Need help in validating the period in an email address. Reply with quote



Hi Sue,

Java is not Javascript.

Try comp.lang.javascript for Javascript related questions.

And when you do, please post more code, like when you call the function.

Regards,
Erwin Moller




Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.