DHTMLX Docs & Samples Explorer

### Cells Progress Control

Cell |
Full Layout |

Source

    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxlayout.css">
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxlayout_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxlayout.js"></script>
    <script src="../../codebase/dhtmlxcontainer.js"></script>

    <div id="parentId" style="position: relative; top: 20px; left: 20px; width: 600px; height: 400px; aborder: #B5CDE4 1px solid;"></div>
    <div style="position: relative; margin-top: 40px; margin-left: 20px;">
        <table>
            <tr>
                <td>Cell&nbsp;&nbsp;<select id="sel"></select>&nbsp;</td>
                <td><input type="button" value="Progress On" onclick="progressOn(false);">&nbsp;<input type="button" value="Progress Off" onclick="progressOff(false);"></td>
            </tr>
            <tr>
                <td>Full Layout</td>
                <td><input type="button" value="Progress On" onclick="progressOn(true);">&nbsp;<input type="button" value="Progress Off" onclick="progressOff(true);"></td>
            </tr>
        </table>
    </div>
    <script>var dhxLayout;
    var sel = document.getElementById("sel");
    function doOnLoad() {
        dhxLayout = new dhtmlXLayoutObject("parentId", "3L");
        //, "dhx_black");
        dhxLayout.forEachItem(function(item) {
            sel.options.add(new Option(item.getId(), item.getIndex()));
        });
    }
    function getInd() {
        var sel = document.getElementById("sel");
        var id = sel.options[sel.selectedIndex].value;
        return id;
    }
    function progressOn(fullLayout) {
        if (fullLayout) {
            dhxLayout.progressOn();
        } else {
            dhxLayout.items[getInd()].progressOn();
        }
    }
    function progressOff(fullLayout) {
        if (fullLayout) {
            dhxLayout.progressOff();
        } else {
            dhxLayout.items[getInd()].progressOff();
        }
    }</script>