Click to See Complete Forum and Search --> : tree menu system


Lasse Sandberg
06-21-2007, 03:27 AM
Hello.

i have the menu in the following datastructure :
first a array called mp.
inside it is objects, in each object i have 1 variable called name, 1 called id. and 1 array called undersides
inside undersides is similiar objects etc.. unless the menu point got no submenues. then undersides is false.

when you click one menupoint it should reload the page with querystrings and that menu should be unfolded, and all submenus should be showing, and so on and on and on if you click them.

and it has to be writtin out in this way :
<div class="menuspace">
<a href='page.asp?cat=23'>menupoint1</a><br>
<a href='page.asp?cat=26'>menupoint2</a><br>
<a href='page.asp?cat=28'>menupoint3</a>
</div>

cat is the id of the object. and obviously name of the link is the name var
and then etc if you click menupoint1 it should print out following giving thoose menu points are there :

<div class="menuspace">
<a href='page.asp?cat=23'>menupoint1</a>
<div class="menuspace">
<a href='page.asp?cat=23,24'>menupoint1submenu1</a><br>
<a href='page.asp?cat=23,25'>menupoint1submenu2</a>
</div>
<a href='page.asp?cat=26'>menupoint2</a><br>
<a href='page.asp?cat=28'>menupoint3</a>
</div>

does anyone have some code lying around that does something smiliar they can post? or know of any tutorial that goes through something equal? have been trying for a while now but just cant get it to work.