Hi Wang,

I can't speak for others here, but this code example is both insufficient
enough to help you. Debugging this requires that you inspect
the response from the server. Use firebug to inspect your request and its
response and then log the result to the firebug console to see what is in
it. This forum is good for getting input, but it's not here to debug your
code for you.

On Thu, Dec 4, 2008 at 3:59 PM, wangsuya (via Nabble) <
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:

>
> 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'});
>         }
>
>
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/When-make-node-and-node%27id-by-loop-and-when-select-node-how-can-take--node%27id-tp1616035p1616035.html
> To start a new topic under MooTools Users, email
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> To unsubscribe from MooTools Users, click here< (link removed) >.
>
>
>


-----
The MooTools Tutorial:  http://www.mootorial.com www.mootorial.com 
CNET Clientside:  http://clientside.cnet.com clientside.cnet.com 
-- 
View this message in context: 
http://n2.nabble.com/When-make-node-and-node%27id-by-loop-and-when-select-node-how-can-take--node%27id-tp1616035p1616152.html
Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to