parent - string or object, id of container, where tree will be initialized, mandatory
name - {string} name which will be assigned to related html input
width - {string} - width of combo ( can be defined in pixels or percents )
type - type of options used in combo, optional
index - tab index assigned to control, optional
-
-
-
-
xml - {string} url of data file (
loadXML)
readonly - {boolean} switch to readonly mode(
readonly)
Options of combo can be defined through items collection
combo = new dhtmlXCombo({
parent:"combo_container",
items:[
{ value:"1", text:"One" },
{ value:"2", text:"Two" },
{ value:"3", text:"Three" }
]
});
Each option can have next attributes
value - {string} value of option
label - {string} text which will be shown for the option
css - {string} style string which can be assigned to option
any event can be assigned by using property equal to event name
combo = new dhtmlXCombo({
parent:"combo_container",
onChange:function(){
alert("I'm changed");
}
});