I have an input field which a user can type into. This input also has an ajax request when on keyup.
This input field can also be populated by an onchange event triggered by a select box the only problem being that when the input is populated by the select box onchange the ajax is not triggered for the input field as the user doesn’t type it in.
I have also used these on the input field to trigger the ajax and none of them work both ways as in when the user manually types in the input field or uses the select box to populate the input field.
.live('change, keyup', function() {
.change(function() {
Element
eventswill not be triggered when it is value is updated using javascript. You should call the keyup event from the .change function when you set the value as below,DEMO