I have the following markup:
<select onchange="jsFunction()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
When a user pulls down the combobox and selects the same option that was previously selected (or doesn't change the selection at all), JavaScript doesn't regard it as an onchange
event. So, the jsFunction()
is not called. But I want the jsFunction()
called even in this case. How can I achieve this?
Try this. Just add an empty option. This will solve your problem.
This works: