Loading ...
Sorry, an error occurred while loading the content.

37013TreeView - Custom style for leafs

Expand Messages
  • matthew_be
    Sep 1, 2008
    • 0 Attachment
      Hi,

      Whenever I load the data of the nodes,I check if the loaded nodes are
      leafs.

      If so, I set the node property isLeaf to true, and I want to apply a
      custom style on the node's html.

      var tmpNode = new YAHOO.widget.TextNode(myObj, node, false);
      if(arr[2] == 'leaf') {
      tmpNode.isLeaf = true;
      if( document.getElementById(tmpNode.getElId()) )
      alert('node in DOM');
      }

      The problem is that the node doesn't seem to be in the document yet,
      and document.getElementById(tmpNode.getElId()) is false
      Thus I cannot access it to apply a custom style to it.

      Can anyone help ?

      Thank you!
    • Show all 3 messages in this topic