Created a simple html demo page.
Attaching the file gave a 'disk full' error, so pasting the code here.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Tree - Combotree on same page Issue Demo</title>
<link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<link rel="stylesheet" type="text/css" href="themes/color.css">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>
</head>
<body>
<h2>Tree + Combotree on same page Issue Demo </h2>
Having a Tree and a Combotree on the same page seems to cause malfunction of the combotree.
<br/>Try selecting something in the combotree. That fails ...
<br/>If you comment out the loadData for Tree, then the combotree works fine.
<br/> <br/>
<table width="50%">
<tr>
<td width="25%">
Tree
<hr/>
<ul id="my_tree" class="easyui-tree"></ul>
</td>
<td valign="top">
Combotree
<hr/>
<input
id="my_combo_tree"
class="easyui-combotree"
/>
</td>
</tr>
</table>
<script>
var hierarchichalData = [ {
"id" : 50,
"text" : "categ-1",
"children" : [ {
"id" : 52,
"text" : "categ-1-1",
"children" : null
}, {
"id" : 54,
"text" : "categ-1-2",
"children" : null
} ]
}, {
"id" : 51,
"text" : "categ-2",
"children" : [ {
"id" : 53,
"text" : "categ-2-1",
"children" : null
} ]
} ];
$(function(){
// load the combo-tree
$("#" + "my_combo_tree").combotree(
'loadData', hierarchichalData
);
// load the tree
// (combo-tree works fine if you comment out below loadData for the tree)
$("#" + "my_tree").tree(
'loadData', hierarchichalData
);
});
</script>
</body>