I have created an extension to show a sidebar in firefox. Now i need to display a tree like structure where the third level will be dynamic and loads a particular link on clicking. I know how to create the three level hierarchy but with static data.. heres the code
<treechildren>
<treeitem container="true" open="true">
<treerow>
<treecell label="Guys"/>
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell id="cell-of-treeitem1" label="Bob" onclick="alert('bob')"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell label="Jerry"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
</treechildren>
The onclick does not showup anything
1)How can i implement the link functionality.. as in a link to be opened on clicking a treecell element? The "onclick" attribute doesnot work. Also and can i run javascript functions on clicking of the individual items.
2) How can i have a dynamic list displayed. suppose i have a JS function that reurns a list, how can i show it here as tree elements (basically then the js should run everytime i expand the tree parent to see the children)