DHTMLX Docs & Samples Explorer

Error reporting

Error reporting extension is usefull in case you want to send bug reports (if there are any), but its strongly recomended, to use it only if errors occur and disable this functionality when working with the component.

Generate error
Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtree.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtree.js"></script>
<script  src="../../codebase/ext/dhtmlxtree_sb.js"></script>
<script  src="../../codebase/ext/dhtmlxtree_er.js"></script>
 
<table>
    <tr>
        <td>
            <div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;"></div>
        </td>
        <td rowspan="2" style="padding-left:25" valign="top">
            <a href="#" onClick="tree.someNonExistingFunc();">Generate error</a><br>
        </td>
    </tr>
</table>
 
<script>
function sort_func(a, b) {
    a = (tree.getItemText(a)).split(" ")[1] || "";
    b = (tree.getItemText(b)).split(" ")[1] || "";
    return ((a > b) ? 1: -1);
}
tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
 
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/csh_bluebooks/");
tree.enableSmartXMLParsing(true);
tree.enableCheckBoxes(true);
tree.enableDragAndDrop(true);
tree.enableThreeStateCheckboxes(true);
tree.loadXML("../common/tree3.xml");
tree.setCustomSortFunction(sort_func);
</script>