Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by esantisbon on Aug 05, 2009 12:03
open dhtmlx forum
Image in dhtmlxCombo not cleared when unselected

We are using a dhtmlxCombo with images, sometimes we need to reset the combo to an unselected option state and for that we consecutively call to these methods:

unSelectOption()
setComboValue('')
setComboText('')

The previously selected option becomes unselected but its image remains visible. What can we do to prevent that behavior and clear the image instead?
Answer posted by Alex (support) on Aug 06, 2009 01:30

Hello, 

try to use the following approach to unselect option:

combo.setComboValue("")
combo.DOMelem_image.style.visibility = 'hidden';

Answer posted by esantisbon on Aug 06, 2009 08:34
Yes, that did it! Also that works when we clear all combo options with combo.clearAll(true)

Thanks a lot!