I am dynamically creating a tree and adding nodes with scri

I am dynamically
creating a tree and adding nodes with script.  When the tree loads I only
load the first level and then as the user drills down I grab the needed data
and fill in the tree.  Currently, if a node has sub-nodes I have to add a
sub-node in order to get the little plus sign next to the root node to tell the
user the root node has child nodes.  It would be optimal if I could just
tell it to show the plus sign and then when the user clicks on the plus sign it
fires the event to grab the data and fill in the tree.  I tried using the
CHILD attribute but it didn�t seem to work.

If you don’t use setXMLAutoLoading methods, child
attribute is ignored.

By default setXMLAutoLoading will cause XML loading,
but in your case it�s not necessary, so you can use
setXMLAutoLoadingBehaviour(mode) method in “function” mode 
which allows to call user function instead of xml.

For example:

  function my_func(id){

  …any kind of logic here…

  //the return result doesn’t matter

  //but you can add item for parent item
here  } tree.setXMLAutoLoadingBehaviour(“function”);

tree.setXMLAutoLoading(my_func);

In such init “child” attribute will work, and onOpen it will
call my_func.