DHTMLX Docs & Samples Explorer

Index
dhtmlxcombo
API Methods

### updateOption(oldvalue, avalue, atext, acss)

Required library edition:
Required library file: dhtmlxcombo.js

updates a specific option in the combo box

- oldvalue - (string) the current option value
- avalue - (string) a new option value
- atext - (string) a new option text
- accs - (string) a new style for the option

    var z=new dhtmlXCombo("combo_zone3","alfa3",200);
    z.addOption([
               {value: "a", text: "option A", img_src: "../images/red.gif", css:"color:red;"},
               {value: "b", text: "option B", img_src: "../images/green.gif"},
               {value: "c", text: "option C", img_src: "../images/blue.gif"}
    ]);
    ...
    z.updateOption("b","b","New option B","color:green;");