DHTMLX Docs & Samples Explorer

Attaching dhtmlxFolders

Source
<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxwindows.js"></script>
<!-- attaching a dhtmlxFolders -->
<script src="../../../dhtmlxFolders/codebase/dhtmlxfolders.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxFolders/codebase/dhtmlxfolders.css">
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
<div id="winVP" style="position: relative; height: 500px; border: #cecece 1px solid; margin: 10px;"></div>
<script>
var dhxWins,
w1,
folders;
function doOnLoad() {
    dhxWins = new dhtmlXWindows();
    dhxWins.enableAutoViewport(false);
    dhxWins.attachViewportTo("winVP");
    dhxWins.setImagePath("../../codebase/imgs/");
    w1 = dhxWins.createWindow("w1", 20, 30, 400, 350);
    w1.setText("Attaching dhtmlxFolders");
    folders = w1.attachFolders();
    folders.setItemType("ftiles");
    folders.setUserData("icons_src_dir", "../../../dhtmlxFolders/samples/common/images");
    folders.loadXML("../common/folders.xml?" + new Date().getTime(), "../../../dhtmlxFolders/codebase/types/ftiles.xsl?" + new Date().getTime());
}
</script>