I am trying to find a way to run a JavaScript function when the user selects a parameter in an HTML field select, regardless of whether this parameter has already been selected. Therefore, onchangethere can be no question.
The problem with use onbluris that (at least in Chrome and Safari) the event does not fire until the user clicks on another element. It can also be annoying if the user focuses on the selection, then clicks without selecting an option, in which case I do not want the event to be fired.
I managed to achieve some success by providing a handler for each of the options onmouseup, but this only works in Firefox, as far as I can tell. Any ideas?
source
share