DHTMLX Docs & Samples Explorer

Attach dhtmlxFolders to Accordion

Source
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxaccordion.js"></script>
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxaccordion_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
<script src="../../../dhtmlxFolders/codebase/dhtmlxfolders.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxFolders/codebase/dhtmlxfolders.css">
 
<div id="accordObj" style="position: relative; width: 350px; height: 400px;"></div>
<script>
var dhxAccord,
folders;
function init() {
    dhxAccord = new dhtmlXAccordion("accordObj");
    dhxAccord.addItem("a1", "dhtmlxFolders");
    dhxAccord.addItem("a2", "b");
    dhxAccord.addItem("a3", "c");
    dhxAccord.openItem("a1");
    //;
    folders = dhxAccord.cells("a1").attachFolders();
    folders.setItemType("ftiles");
    folders.setUserData("icons_src_dir", "../../../dhtmlxFolders/samples/common/images");
    folders.loadXML("../../../dhtmlxWindows/samples/common/folders.xml?" + new Date().getTime(), "../../../dhtmlxFolders/codebase/types/ftiles.xsl?" + new Date().getTime());
}
</script>