Dropdown must use both onChange and onKeyPress events
Bear in mind that when writing JavaScript / jQuery code for handling user changes made to dropdown boxes, you must program your website reaction not only to onChange
but also to onKeyPress
events. Why? There is a rare situation, where user selects value by clicking dropdown and then using keyboard’s cursor up or cursor down keys. onKeyPress
event will be fired in this situation instead of onChange
event. And desired effect won’t work, if you put it only to onChange
event handler.
Read More “Dropdown must use both onChange and onKeyPress events”