Log in

View Full Version : Tree with checkboxes



azahrudhin
06-16-2007, 01:42 PM
Hai dear all , I am azahrudhin, working in bahrain, I have a java script array using that i should generate the treeview with the checkboxes similer to norton or mycomputer will allow us to check or uncheck the tree and collapse
Using javascript

treeList[0] = new Array();
treeList[0][5 = new Array();

treeList[0][0] = "999"//OrganizationId
treeList[0][1] = "Asia"//OrganizationName
treeList[0][2] = "1"//NodeId
treeList[0][3 = "999"//Parent
treeList[0][4]= "999"//treeStructure

treeList[0][0] = "105"//OrganizationId
treeList[0][1] = "China"//OrganizationName
treeList[0][2] = "0"//NodeId
treeList[0][3 = "999"//Parent
treeList[0][4]= "999\105"//treeStructure

treeList[0][0] = "100"//OrganizationId
treeList[0][1] = "Bruni"//OrganizationName
treeList[0][2] = "1"//NodeId
treeList[0][3 = "999"//Parent
treeList[0][4]= "999\100"//treeStructure

generate the tree with this array if i pass this array to javascript function it should give me a tree

dog
06-18-2007, 12:45 PM
Hi azahrudhin,

I just read your post. I don't understand what your question is, or what problem you are having.

No one else has replied to the post. You may like to try to define your problem more clearly.

Another thing. It seems your thread is more Javascript related than HTML. There is a Javascript forum that may be you should be aware of.

Peace,
dog

alexjewell
06-18-2007, 02:43 PM
the only thing I notice is missing brackets:



treeList[0] = new Array();
treeList[0][5] = new Array();

treeList[0][0] = "999"//OrganizationId
treeList[0][1] = "Asia"//OrganizationName
treeList[0][2] = "1"//NodeId
treeList[0][3] = "999"//Parent
treeList[0][4]= "999"//treeStructure

treeList[0][0] = "105"//OrganizationId
treeList[0][1] = "China"//OrganizationName
treeList[0][2] = "0"//NodeId
treeList[0][3] = "999"//Parent
treeList[0][4]= "999\105"//treeStructure

treeList[0][0] = "100"//OrganizationId
treeList[0][1] = "Bruni"//OrganizationName
treeList[0][2] = "1"//NodeId
treeList[0][3] = "999"//Parent
treeList[0][4]= "999\100"//treeStructure