I'm using the dynatree plugin for the first time, and I'm trying to add nodes dynamically. My code is below:
function DrawTree() {
var names = GetChildName();
var rootNode = $("#ProcessRoleTree").dynatree("getRoot");
var childNode = rootNode.addChild({ title: names[0].Name });
}
On runtime an error displays
Microsoft JScript runtime error: Object doesn't support this property or method
Am I missing something ?? I have verify that i included needed libraries :
<script src="Jquery/jquery/jquery.js" type="text/javascript"></script>
<script src="Jquery/jquery/jquery-ui.custom.js" type="text/javascript"></script>
<script src="Jquery/jquery/jquery.cookie.js" type="text/javascript"></script>
<link href="Jquery/src/skin-vista/ui.dynatree.css" rel="stylesheet" type="text/css" />
<script src="Jquery/src/jquery.dynatree.js" type="text/javascript"></script>
Thanks in advance!