onSelectionChange event does not work for mouse selection

Hi,
As in here [url]http://www.dhtmlx.com/docs/products/dhtmlxCombo/samples/05_events/01_combo_events.html[/url]
selection change event is firing when you select another option using keyboard arrows. However it does not work when mouse is over. Is this correct behavior? Do you know any workaround to fire this event with mouse?

Regards,
Stan

Hi,

the value in the header is not preselected on mouse over. This event just highlight options. If for example the mouse is over non-selected option and you move the mouse out of the combo, this option won’t become selected.

If you need to fire a certain event on mouseover, you need to modify dhtmlxcombo.js:

  • locate dhtmlXCombo.prototype._listOver method definition in sources/dhtmlxcombo.js
  • find that._tempSel.select(); line here
  • and put the following after it:

that.callEvent(“onMouseOver”,[i]);

This is the call of custom combo event onMouseOver. It can be used as follows:

yourCombo.attachEvent(“onMouseOver”,function(optionIndex){
// your code
});