users
[Top] [All Lists]

Re: [cinjug-users] jsp form question

To: "Jason Kretzer/STAR BASE Consulting Inc." <JKretzer@xxxxxxxxxxxxxxx>, users@xxxxxxxxxx
Subject: Re: [cinjug-users] jsp form question
From: justin fister <justin@xxxxxxxxx>
Date: Fri, 2 Apr 2004 09:18:25 -0500
Delivered-to: mailing list users@cinjug.org
In-reply-to: <OF9A0EE206.E51E68BD-ON85256E6A.004CB838-85256E6A.004D118C@starbaseinc.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Organization: Opinion One
References: <OF9A0EE206.E51E68BD-ON85256E6A.004CB838-85256E6A.004D118C@starbaseinc.com>
Reply-to: justin@xxxxxxxxx
User-agent: KMail/1.4.1
Jason,
You can use the "onsubmit" attribute of the HTML "form" tag to specify a 
javascript function that validates the form prior to POSTing to the server.  
If an input field is empty, simply return false from the onsubmit function 
and the contents of the form will not be posted.
I hope that helps...

Justin

On Friday 02 April 2004 09:00 am, Jason Kretzer/STAR BASE Consulting Inc. 
wrote:
> Good morning all,
>
> I have a question about form submission.  I have a jsp that has a form of
> about 12 input fields.  All of the fields are required to have something
> in them.  Is there a way to have a javascript to do this and then still
> POST the form to a servlet?
>
> Thanks,
>
> -Jason


<Prev in Thread] Current Thread [Next in Thread>