[whatwg] Web Forms 2.0 - select element
Jon Levell
whatwg at coralbark.net
Wed Oct 12 15:32:51 PDT 2005
Hi,
I know that it is a little late in the game to start suggesting entirely
new content for the Web Forms 2.0 spec but I've had real trouble in the
last few days using select elements in an intranet app. I'd like to
suggest the addition of an onchoose event handler to select elements.
Onchoose would act like onchange but would be fired even in the choice
was the same as before.
This is *not* the same as onclick as that is fired when the select menu
is opened in current UAs (unless the whole opening the menu and choosing
an option is accomplished with one long click).
Writing some javascript that simulates this using the onmousedown
/onmouseup handlers is non-trival because of the two mode of operation;
the double click (once to open the menu, once to select an option) and
the single long click operation.
A simple use-case for this is a web-based email program. With the inbox
shown, messages can be marked as selected with check-boxes then actions
applied to the selection with a select box. If 5 messages are selected
and then say "marked as important" and then 2 more messages are selected
and then the operation is repeated the onchange handler is not called.
So that authors could code for both legacy UAs as well as compliant UAs
I'd suggest that the onchange handler shouldn't fire if an onchoose
handler is specified for an element as that could be easily replicated
in new UAs from onchoose if necessary.
Is this easily possible already? Am I missing something? If not is this
a good idea?
Jon Levell
More information about the whatwg
mailing list