Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nick on Jan 24, 2009 18:02
open dhtmlx forum
combobox set value of select list

How friends. I just downloade dand am testing the combobox component. How trying to figure out how to set the value of a select list with javascript. I'm trying to set like so "document.theForm.cars.selectedIndex = 'FORD';". and nothing happens to my combox component. What am I doing wrong?
Answer posted by Support on Jan 26, 2009 02:17
After you have native select converted to the combo, you need to use API of combo to set|get values

var combo = dhtmlXComboFromSelect(select);
...
combo.setComboValue("FORD");