Dear All,
I am tryig to load the tree using the JSON Object.But the tree is not visible i tested the same by keeping an alert then i came to know that it is visible until we close the alert.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"></meta>
<title></title>
</head>
<link rel="stylesheet" type="text/css" href="codebase/dhtmlxtree.css"></link>
<script src="codebase/dhtmlxcommon.js"></script>
<script src="codebase/dhtmlxtree.js"></script>
<script src="codebase/ext/dhtmlxtree_start.js"></script>
<script src="codebase/ext/dhtmlxtree_json.js"></script>
<script src="codebase/ext/dhtmlxtree_ed.js"></script>
<script src="codebase/ext/dhtmlxtree_er.js"></script>
<link rel="stylesheet" href="codebase/dhtmlxscheduler.css"
type="text/css" media="screen" title="no title" charset="utf-8"></link>
<link rel="stylesheet" href="codebase/ext/dhtmlxscheduler_ext.css"
type="text/css" title="no title" charset="utf-8"></link>
<script type="text/javascript" charset="utf-8">
var treeData = {
id : 0,
item : [ {
id : 1,
text : "first"
}, {
id : 2,
text : "middle",
child : "1",
img0 : "book.gif",
item : [ {
id : "21",
text : "child"
}, {
id : "22",
text : "child"
}, {
id : "23",
text : "child"
} ]
}, {
id : 3,
text : "last"
} ]
};
function init() {
initPhysicianList();
}
function initPhysicianList() {
var tree = new dhtmlXTreeObject("doctor_tree", "100%", "100%", 0);
tree.setImagePath("codebase/imgs/");
tree.loadJSONObject(treeData);
alert("Initializing Tree")
}
</script>
<body onload="init();">
<div id="doctor_tree" setImagePath="codebase/imgs/csh_bluebooks/"
class="dhtmlxTree"
style="width: 250px; height: 180px; background-color: #f5f5f5; border: 1px solid Silver;"></div>
</body>
And even the attach event is also not working.
please do help me in resolving the issue
Thanks and Regards
Tirupathi Rao.P