DHTMLX Docs & Samples Explorer

attachObject(obj)

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

attaches html object to the cell

  • obj - object/objectId
    <body>
        <div id="myObj"> .. </div>
    </body>

Attaching to the layout's cell:

    <script>
        dhxLayout.cells("a").attachObject("myObj");
        // or
        var obj = document.getElementById("myObj");
        dhxLayout.cells("a").attachObject(obj);
    </script>

Attaching to the accordion's cell:

    <script>
        dhxAcc.cells(id).attachObject("myObj");
        // or
        var obj = document.getElementById("myObj");
        dhxAcc.cells(id).attachObject(obj);
    </script>

Attaching to a window:

    dhxWins.window(id).attachObject("myObj");

Attaching to a tab:

    dhxTabbar.cells(tabId).attachObject("myObj");