| Page 1 of 1 | [ 2 posts ] |
|
Hi team
i m trying to implement the tree view in my application. i have gone thru the getting started example.To some extent i got what i need to do later on i could not get could some one please tell me how to proceed further from where i m stuck. here the steps what i did . 1 .copied all the css and js links 2. given the reqiured class name to the body tag 3. wrote the following function <script.... var tree; function treeInit() { tree = new YAHOO.widget.TreeView("treeDiv1"); } </script> 4.i have created a div as follows. <div id="treeDiv1"> <ul> <li class="expanded">List 0 <ul> <li class="expanded">List 0-0 <ul> <li>item 0-0-0</li> <li><a target="_new" href="www.elsewhere.com" title="go elsewhere">elsewhere</a></li> </ul> </li> </ul> </li> <li>List 1 <ul> <li>List 1-0 <ul> <li yuiConfig='{"type":"DateNode","editable":true}'>02/01/2009</li> <li><span>item <strong>1-1-0</strong></span></li> </ul> </li> </ul> </li> </ul> </div> 5.from here on words i did not get how to proceed on. so started experimenting in different ways by including the below mentioned script at the end and tried but still i culd not get how does it works var tree; function treeInit() { tree = new YAHOO.widget.TreeView("treeDiv1"); var root = tree.getRoot(); var tmpNode = new YAHOO.widget.TextNode({ label: "mylabel1", expanded: false }, root); var tmpNode2 = new YAHOO.widget.TextNode({ label: "mylabel1-1", expanded: false }, tmpNode); tree.render(); } Please help me out . i have an Unordered list and i need to create the tree structure view for it . please tell me how to do. Thanks & regards sai krishna |
|
In the first piece of code you show, the call to the render method is missing so nothing will come out. In the second, you do have the call to render and it should show fine. However, neither of this is the whole story. You say you copied all the links. You mean that you copied some of the files of the YUI library to your local machine? That is usually the cause of trouble since you might be missing something and some of the references from one to the other might be missing. Why not try it out from YAHOO's own servers? If you want to learn programming with the YUI Library, that is the best. If you want to learn how to administer a library installation, that is a completely different subject and it is not the way to begin.
A good place to try out things and test them is jsfiddle.net. You can share your working code right there and see what happens. |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group