Into the ui.combobox plugin :
i added at the end of the select method :
$(input).trigger("change", ui);
i added before the "var input ..." :
select.attr('inputId', select.attr('id') + '_input');
after, to have a functional onchange event... on ui.combobox i commented the change method and moved its code to the checkval method that extends ui.autocomplete :
$.extend( $.ui.autocomplete, {
checkVal: function (select) {
var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex($(this).val()) + "$", "i"),
valid = false;
$(select).children("option").each(function () {
if ($(this).text().match(matcher)) {
this.selected = valid = true;
return false;
}
});
if (!valid) {
// remove invalid value, as it didn't match anything
$(this).val("");
$(select).val("");
$(this).data("autocomplete").term = "";
$(this).data("autocomplete").close();
}
}
});
and i coded the input change method as below :
var oCbo = ('#MyCbo').combobox();
$('#' + oCbo.attr('inputId')).change(function () {
// from select event : check if value exists
if (arguments.length < 2) {
$.ui.autocomplete.checkVal.apply(this, [oCbo]);
}
// YOUR CODE HERE
});