L
lawpoop
I'm writing a javascript function to run when a user selects a value
in a select box.
I've been playing around with the example usage of onMouseOver,
onMouseDown, onMouseUp, onChange, onBlur, onFocus with a select input.
The event onChange comes the closest, but from my testing, if there is
a default value, and the user clicks on the select box, looks at the
list, and re-selects the original answer, the event isn't fired -- of
course, because it fires on a change
I don't think I can use the onMouseUp or onClick, because those events
can be triggered just to drop down the menu on the select box. What I
would need to use is the onMouseUp of the actual menu selection.
Since I'm re-writing html that appears immediately below the select
box, I don't want to use onBlur, because then the user might lose
their cursor when the html changes.
What's the best way to solve this problem?
in a select box.
I've been playing around with the example usage of onMouseOver,
onMouseDown, onMouseUp, onChange, onBlur, onFocus with a select input.
The event onChange comes the closest, but from my testing, if there is
a default value, and the user clicks on the select box, looks at the
list, and re-selects the original answer, the event isn't fired -- of
course, because it fires on a change
I don't think I can use the onMouseUp or onClick, because those events
can be triggered just to drop down the menu on the select box. What I
would need to use is the onMouseUp of the actual menu selection.
Since I'm re-writing html that appears immediately below the select
box, I don't want to use onBlur, because then the user might lose
their cursor when the html changes.
What's the best way to solve this problem?