<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">
<style>
.pager{
top:280px;
left:20px;
cursor:default;
color:gray;
background-color:white;
padding-left:10px;
padding-right:10px;
}
</style>
<script>var myFolders;
function doOnLoad() {
myFolders = new dhtmlxFolders("folders_container");
myFolders.setItemType("ficon");
myFolders.setUserData("icons_src_dir", "../common/images");
myFolders.loadXML("../common/files_ext_05_paginal_output.xml", "../../codebase/types/ficon.xsl");
myFolders.setPagerContainer("pager");
}
function changeType(type) {
myFolders.setItemType(type, "../../codebase/types/" + type + ".xsl");
}
function enablePaging(num, dyn) {
myFolders.clearAll();
myFolders.loadXML("../common/files_ext_05_paginal_output.xml");
myFolders.enablePaging(num, dyn);
}
function disablePaging() {
document.getElementById("pager").style.display = "none";
myFolders.enablePaging(false);
}
</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:396px;overflow:hidden;position:absolute;top:65px;left:20px;border:0px solid red;"></div>
<div id="pager" class="pager" style="position:absolute;top:470px;left:20px;cursor:default;display:none;">
</div>
</div>
<input type="radio" name="switch1" onclick="disablePaging()" checked> Disable Paging<br>
<input type="radio" name="switch1" onclick="enablePaging(10)"> Enable Paging with 10 items per page<br>
<input type="radio" name="switch1" onclick="enablePaging(5)"> Enable Paging with 5 items per page<br>
<input type="radio" name="switch1" onclick="enablePaging(10,true)"> Enable Paging with 10 items per page and dynamical loading*<br>
* - as soon as we use static xml file for this sample, dynamical loading will load same content endlessly.
<h3>Paging state remains while changing types</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>