Yes, you have to use JavaScript for this, JSP is server side only.
Try http://www.javascripts.com for some examples.
Steve S
> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Yeung
>
> How do I write code for a button that does its own things
> before passing
> data to a servlet? For example, I have <input type=button>
> and this button
> checks to see the date field has the correct format before
> submitting it
> to the server. Do I use javascript? Or do I use Java? What do
> I put in the
> OnClick field of the button? How can I preserve the session?
===========================================================================
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