 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sue Guest
|
Posted: Mon Nov 24, 2003 3:39 am Post subject: Need help in validating the period in an email address. (new |
|
|
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
|
Posted: Mon Nov 24, 2003 9:44 am Post subject: Re: Need help in validating the period in an email address. |
|
|
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 |
|
 |
|
|
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
|
|