Hi Tripat,

This is a way-off topic for SERVLET list, but since everyone's being so nice
about that lately...

I guess Matt already gave the correct answer, but the proper way to validate is
client-side using JS (to save network traffic and immediate feedback to user),
and server side just to be sure, but most important to test for correct data
types for relational database updates and inserts, e.g. that a date is in
correct format and date range makes sense - a simple test on client side can
test format, such as on an onChange event that calls a generic check_date()
function that you create and reuse in all your forms with dates to check that
the user-entered date follows MM/DD/YYYY format (for example), and the server
side can also validate, in this case somewhere in your JAVA SERVLET.

david hall.

Tripat Singh wrote:

> Hi pals!!!
>
> I would like to have a opinion of all of you for validating fields in the
> html page.
>
> -- Whats is the preferable way to validate fields - server side in the
> servlet/jsp page or using the java script at the client end?
>
> -- What are the advantages and disadvantages of both the techniques?
>
> -- Suppose i choose the server side validation, should i validate ALL the
> required fields
>
> or
> as soon i find the FIRST reqired field which was left blank and ask end user
> to  fill up all the required field(s).
>
> Thanks and Regards
>
> Tripat
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to