Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by James on Jun 12, 2008 13:17
open dhtmlx forum
disable/enable combobox with onpick option?

I have set a combobox, "zColor" to be disabled. However, I want to enable "zColor" once a value from a different combobox, "zSize" has been selected.

My approach was to use the onpick option:

<option value="1" onpick="zColor.disable(false)">Size 1 [ x ]</option>

Any suggestions?
Answer posted by Support on Jun 13, 2008 02:13
It can be done as

comboA.attachEvent("onChange",function(){
    if (comboA.getActualValue()=="1")
       zColor.disable(false);
    else
       zColor.disable(true);
})