My tree is generated by reading data from the database.
It is found that all nodes can be traversed only when all nodes are expanded. Otherwise, an error is reported and you do not know if it is a bug.
function getv1 (node)
{document. all ("hidden1 "). value = "";
var nodearray = new array ();
nodearray = node. getchildren ();
If (parseint (nodearray. length )! = 0)
{< br> for (VAR I = 0; I {< br> var cNode = nodearray [I];
// alert (cNode. getattribute ("text");
getv1 (cNode);
}< BR >}< br> else
{< br> If (node. getattribute ("checked") = true)
{< br> document. all ("hidden1 "). value = document. all ("hidden1 "). value + node. getattribute ("ID") + "#";
}< BR >}< br> // alert (document. all ("hidden1 "). value);
}
< Body ms_positioning = " Gridlayout " >
< Form ID = " Form1 " Method = " Post " Runat = " Server " >
< Iewc: Treeview ID = " Treeview1 " Style = " Z-INDEX: 101; left: 8px; position: absolute; top: 8px " Runat = " Server " > </ Iewc: Treeview > < Input ID = " Hidden1 " Style = " Z-INDEX: 102; left: 296px; position: absolute; top: 296px " Type = " Hidden"
Name = " Hidden1 " Runat = " Server " >
< ASP: button ID = " Button1 " Style = " Z-INDEX: 103; left: 456px; position: absolute; top: 464px " Runat = " Server"
Text = " Display " > </ ASP: button > </ Form >
< Script >
Getv1 (treeview1 );
</ Script >
</ Body >