[thelist] Deselecting a select element in JS

David Wagner dave at worlddomination.net
Fri Mar 22 16:19:01 CST 2002


.jeff wrote:

>indeed nn6 pukes on the select-one on the test page i put up, though it works flawlessly with the select-multiple.  unless someone can point to a definitive resource that says "selectedIndex can't be a negative number" or "you can't unselect all options in a select-one", i'll consider it a bug in nn6 and proceed accordingly.
>
"Flawlessly" might be a bit of an overstatement, since (on my machine,
using Mozilla 0.9.9) the select-multiple box does a very brief but very
wacky dance before resetting. Kinda fun, really.

Also, doing *anything* with the select-one box in Moz, including your
clever reset function, seems to fail *until* the focus shifts. I suspect
a flaw in the focus/blur implementation in Mozilla, though I'm too lazy
to go look up any known issues of that sort.

(Note to all: Hi, glad to be back. I tried to stick with a real job in a
large software company, but I guess web dev is in my bones now...)

--

David Wagner
dave at worlddomination.net





More information about the thelist mailing list