Schechter Gary wrote:

> I'm a newbie with JSP so plz pardon the question:
>
> my users are used to having immediate notification if they enter something wrong
> in a  field.
>
> For example, if a textfield is supposed to contain a number, i would like to
> either prevent them from entering an alphabetic char in the field in the first
> place, or give an error message immediately, without having them fill in the
> entire form and submitting the page to the server.
>
> i realize that jsp means server-side, but is there any way to do this with an
> html/jsp driven application ?
>

Include client-side JavaScript functions to do the validation as the user fills in
the form.  The JavaScript can be statically included in the JSP page itself (for
things like "required field" validation), or dynamically constructed in scriptlets
(or custom tags) in the page for more complicated cases.

> thanx
> gary
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to