Gary,
You need to use javascript. Here is a cheesy example:
THE SCRIPT
<script>
function checkFields() {
theValue = document.forms[0].whatever.value;
if (isNaN(theValue) == true) {
alert("Whatever must be numeric!");
document.forms[0].whatever.value = "";
}
}
</script>
THE FORM
<form action="wherever.jsp" method="post" name="theform">
<input type="text" name="whatever" size="10" maxlength="10"
onChange="checkFields()"><br>
<input type="text" name="whatever2" size="10" maxlength="10">
<input type="submit" value="Submit">
</form>
Greg Holtfreter
http://www.spidersites.com
----- Original Message -----
From: "Schechter Gary" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 15, 1999 2:16 PM
Subject: client-side validations with JSP
> 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 ?
>
> thanx
> gary
>
>
===========================================================================
> 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
===========================================================================
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