I try to edit content of an select input when text entered to a textbox by using jQuery. This is my TextBox
<input id="id_subsector_selector" type="text" maxlength="100" name="subsector_selector" onblur="onSubSectorSelectorChange(this);"/>
and this is my multiple selectbox
<select id="id_subsector" name="subsector" multiple="multiple">
<option value="14">Yazılımevi </option>
</select>
This is my javascript function(I know this is trivial)
function onSubSectorSelectorChange(item) {
$('select#id_subsector').html("");
}
The question is when I enter a character to the textbox, althought onSubSectorSelectorChange function is triggered, selectbox content doesn't change until I click on somewhere on page or press tab button.
The problem may be the trigger action which is "onBlur" but I couldn't find a proper function. I am waiting for any comment or solution!
Thanks