Change item type on the fly
Change Items Type
F-iconF-tiles
F-table
<script src="../../codebase/dhtmlxcommon.js" type="text/javascript"></script> <script src="../../codebase/dhtmlxfolders.js" type="text/javascript"></script> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxfolders.css"> <script></script> <div style="position:relative;"> <img src="../common/images/samples_frame.gif" width="436" height="513" alt="" border="0"> <div id="folders_container" style="width:396px;height:400px;overflow:hidden;position:absolute;top:65px;left:20px;border:0px solid red;"></div> </div> <h3>Change Items Type</h3> <input type="radio" name="switch" onclick="changeType(this.value)" value="ficon" checked> F-icon<br> <input type="radio" name="switch" onclick="changeType(this.value)" value="ftiles"> F-tiles<br> <input type="radio" name="switch" onclick="changeType(this.value)" value="ftable"> F-table<br>var myFolders; function doOnLoad() { myFolders = new dhtmlxFolders("folders_container"); myFolders.setItemType("ficon"); myFolders.setUserData("icons_src_dir", "../common/images"); myFolders.loadXML("../common/files_ext.xml", "../../codebase/types/ficon.xsl"); } function changeType(type) { myFolders.setItemType(type, "../../codebase/types/" + type + ".xsl"); }