Check documentation for the latest version of dhtmlxSuite forEachListOption DHTMLX Docs


calls a user-defined handler for each listed option of a parentId

void forEachListOption(string|number parentId,function handler);


parentIdstring|numberid of a select button
handlerfunctiona user-defined function, the id of a listed option will be passed as an argument


myToolbar.forEachListOption(parentId, function(optionId){
    // your code here
// or
function doWithListOption(optionId){
    // your code here
myToolbar.forEachListOption(parentId, doWithListOption);

Back to top