sorry post it again, I think that my title is unappridacate, not let
people understand my meanint so that I change title post again.

I tryed to make tree by loop and when select each node show this node
's id, for example select "Subnode2.2.1" show "2.2.1" but it did not
success alway show "2.2.10" . Who know how to realize what I want?
Tanks.


Wang Suya


var index2 = new String;
        for(j = 1; j <= 10; j++){
                index2 = "2.2."+j
                var f = new String;
                f = "2.2."+j;
                var index1 = node2_2.insert({text:'Subnode 2.2.'+j,
id:index2, color:'#00a000',
                onSelect: function(state) {
                      if(state){
                        var b = new String;
                        b = '';
                        for(i = 0; i< 5; i++){
                                if(i >0){
                                        b = b +"&"+"d"+i +"=" +i
                                }else{
                                        b = "d0="+f
                                }
                        }
                        var myajax = new Request.JSON
({url:"test.php",method:'post',onComp
lete:function(mystring){
                                alert(mystring.p0.name);
                                alert(mystring.p1.name);
                                alert(mystring.p2.name);
                                alert(mystring.p3.name);
                                alert(mystring.p4.name);
                        }});
                        myajax.send(b);
                        }
                        }


                });
                var node2_2_1_1 = index1.insert({text:'Subnode
2.2.1.'+j, id:'2.2.1.'+j, c
olor:'#0000ff'});
        }


Reply via email to