hava a try this

if (email.indexOf("@")<=0)
 {
  alert("invalid email address");
  return;
 }

Xia Yu
P.R.China

----- Original Message -----
From: "Jan D. Herzhoff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 20, 2000 4:56 PM
Subject: check emailadress


> Hi,.
>
> I am a newbie in JSP and I would like to create a form with an error script.
> If someone types an email adress without an "@" for example an error code
> should appear.
>
> How can I do this or what else do I have to check?
>
> Thanks and best regards,
>
> J/~\n
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to