Smart Refresh
Source
<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> <input type="radio" id="smartm1" name="smartm" checked> Enable Smart Refresh Mode<br> <input type="radio" id="smartm0" name="smartm" > Disable Smart Refresh Mode<br> Reload content from <a href="javascript:void(0)" onclick="reload('../common/files.xml')">files.xml</a> or <a href="javascript:void(0)" onclick="reload('../common/files2.xml')">files2.xml</a>.<br> <div> </div>var myFolders; function doOnLoad() { myFolders = new dhtmlxFolders("folders_container"); myFolders.setItemType("ficon"); myFolders.setUserData("icons_src_dir", "../common/images"); myFolders.loadXML("../common/files.xml", "../../codebase/types/ficon.xsl"); } function reload(url) { var mode = document.getElementById('smartm1').checked; myFolders.enableXMLSmartRefresh(mode); if (!mode); myFolders.clearAll(); myFolders.loadXML(url); }