Nic Ferrier <[EMAIL PROTECTED]> wrote:
__________
>>>> Robert Pimentel <[EMAIL PROTECTED]> 04-Jul-00 3:20:58 PM >>>
>
>>Hi, is it possible to have 'on the fly' textfield
>>validation, which instigates a submit(without using
>>a button), using servlets?? How would I go about
>>doing it??
>
>>i.e. User enters "abc" into textfield1. Contents of
>>textfield1 are validated. The form is submitted once
>>the contents have been validated.
>
>No. It's not possible to do what you're thinking. The web is a
>distributed environment and allowing this sort of client-server
>technique would cause big speed/congestion problems.
>
>You have two options for validation:
>
>1. download JavaScript validation code with the page
>Have JS check the field before the form is submitted... allow the
>submit if it's okay but don't if it's not.
>
>2. have the servlet do all your validation for you.
>
>
>Nic Ferrier
>
>
Nic is right (of course), but any
checking you care about must
be done server side, since the
user can see/edit/disable your
javascript.
Use Javascript to 'enhance the
user experience' but the servelet
to enforce your business rules.
Often this means putting the
same check on both sides.
Tim.---
URL http://www.westhawk.co.uk/

___________________________________________________________________________
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