Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #9835

Re: Alert and Input Control Events

From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.javascript
Subject Re: Alert and Input Control Events
Date 2011-12-31 23:40 -0800
Organization A noiseless patient Spider
Message-ID <n330g75jbqgdjce14vb9t99thq5cksb51f@4ax.com> (permalink)
References <tftpf71vp0a6shta2387ren56i64tqvs3i@4ax.com> <LpadnX8jAONqy2PTnZ2dnUVZ8smdnZ2d@giganews.com>

Show all headers | View raw


On Sat, 31 Dec 2011 01:27:32 +0100, Stefan Weiss
<krewecherl@gmail.com> wrote:

[snip]

>A trivial (and admittedly construed) example where gluing the focus to
>one particular field would be harmful is a 3-field date input:
                                            ^^^^^^^^^^^^^^^^^^
     Yech!

>   [2011] [11] [30]   (pre-filled values)
>
>The user realizes that the correct value should be 2011-12-31, and
>starts by changing the "day" field, entering "31". This results in a
>temporarily invalid date - but they can't leave the "day" field to
>adjust the "month" field. They will swear at the "stupid braindead app",
>click away the alert, enter "30", change the month, and finally enter
>"31" again.

     I am referring to field-level validation, not form-level
validation.  If a field value itself is invalid *without reference to
any other fields*, I will throw an error.  In the above example,
entering a month 13 is such an error.  Entering a day 32 is such an
error.  Entering a day 31 is not such an error.

     If the problem is that two or more field values are incompatible
(say, month 2 and day 30), that is a form-level error and I would
handle that on form submit.

     The principle is to catch the error as soon as possible.

[snip]

Sincerely,

Gene Wirchenko

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Alert and Input Control Events Gene Wirchenko <genew@ocis.net> - 2011-12-29 15:28 -0800
  Re: Alert and Input Control Events Stefan Weiss <krewecherl@gmail.com> - 2011-12-31 01:27 +0100
    Re: Alert and Input Control Events Gene Wirchenko <genew@ocis.net> - 2011-12-31 23:40 -0800
      Re: Alert and Input Control Events Gregor Kofler <usenet@gregorkofler.com> - 2012-01-01 12:02 +0100
        Re: Alert and Input Control Events "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-01 13:21 +0000
          Re: Alert and Input Control Events Gregor Kofler <usenet@gregorkofler.com> - 2012-01-01 16:55 +0100
        Re: Alert and Input Control Events Gene Wirchenko <genew@ocis.net> - 2012-01-02 10:49 -0800
          Re: Alert and Input Control Events Scott Sauyet <scott.sauyet@gmail.com> - 2012-01-03 04:54 -0800
            Re: Alert and Input Control Events Gene Wirchenko <genew@ocis.net> - 2012-01-03 17:13 -0800

csiph-web