DHTMLX Docs & Samples Explorer

Unload

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>
<input type="button" value="Unload" onclick="unload();" style="margin-top: 40px;">
<script>
var dhxLayout;
function doOnLoad() {
    dhxLayout = new dhtmlXLayoutObject("parentId", "4I");
    dhxLayout.cells("a").setText("Main Page");
    dhxLayout.cells("b").setText("Site Navigation");
    dhxLayout.cells("c").setText("Support & Feedback");
    dhxLayout.cells("d").setText("Comments");
}
function unload() {
    if (dhxLayout != null) {
        dhxLayout.unload();
        dhxLayout = null;
    }
}
</script>