DHTMLX Docs & Samples Explorer

forEachListOption(parentId, handler)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxtoolbar.js

calls user defined handler for each listed option of parentId

  • parentId - id of a select button
  • handler - user defined function, listed option id will passed as an argument
    toolbar.forEachListOption(parentId, function(optionId){
        // code here
    });
    // or
    function doWithListOption(optionId){
        // code here
    }
    toolbar.forEachListOption(parentId, doWithListOption);