| Sample: dhtmlxFolders | Change item type on the fly | dhtmlxFolders main page |
<div id="folders_container" style="width:400px;height:300px;overflow:hidden;"></div> <script></script>//Initialize dhtmlxFolders var myFolders; myFolders = new dhtmlxFolders("folders_container"); //set type of items myFolders.setItemType("ficon"); //set icons_src_dir value. will be used as path to icons in ficon.xsl myFolders.setUserData("icons_src_dir","../images"); //load data and items type xsl file myFolders.loadXML("files_ext.xml","../../codebase/types/ficon.xsl"); //Function which changes items type function changeType(type){ //change item type without reloading data myFolders.setItemType(type, "../../codebase/types/"+type+".xsl"); }
| © DHTMLX LTD. All rights reserved |