Form validation
by "Ann Ezzell" <amcbainezzell(at)alum.mit.edu>
|
| Date: |
Thu, 30 May 2002 08:35:18 -0700 |
| To: |
<hwg-techniques(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
Which do you think is the better approach for client-side form
validation when the form has a set of radio buttons to select an option,
and one of the options is "other", and there is also a text box to
specify the "other"?
Option 1:
If the user types in the text box, the "other" radio button is
automatically selected. If the user selects a radio button that's not
"other", the "other" text box is cleared. Javascript is used as a backup
check before submitting the form.
Option 2:
Javascript is used to check the status of the answers before submitting
the form - the user is asked to correct his/her response if the form is
not completed correctly (e.g., there's text in the "other" text box, but
a non-other option is selected)
Other approaches?
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.