jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Trigger Change Event › Reply To: Trigger Change Event
Hi srosam,
As the combobox documentation states, this event is triggered when the user selects an item. In your case, if “bob” is an existing item from the combobox’s source, use selectItem instead of val. If you wish some function to be executed on the change event and when you call val, you can try the following:
function myFunction() {
...
}
...
$('#jqxComboBox').on('change', function(event) {
myFunction();
});
...
$('combo').jqxComboBox('val', 'bob');
myFunction();
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/