View Full Version : Expanding tree java code

02-06-2004, 10:18 AM
Hiya all... i got a great code from

but... i have edited so it uses my links instead now.

The result is here

you can view the source in the index.htm file.

My problem is this, that i have added so there are now 48 arrays.
But it doesn't show them all.
It's not limited in the number of arrays, it seems to be limited to the number of sub links you can create under a parent link.

There are in the code a Foldout and a non foldout link.
And there can only be 2 foldout under each foldout. I can have alot more non foldout than 2 but the foldouts i have only been able to have 2 of.

Could someone help me?

02-06-2004, 11:32 AM
You were not attentive when reading the Symplythebest specifications. You have to put

document.write('<PRE><font face=arial size=3>')
for (var i = 0; i < outline.length; ++i) {
if (outline[i].state) {
for (var j = 0; j < outline[i].depth * 5; ++j) {
document.write(' ')
document.write(outline[i].pic, ' ', outline[i].text, '<BR>')
} else {
var previous = i
for (var k = i + 1; k < outline.length && outline[k].depth >= outline[previous].depth; ++k) {
// -->

in the BODY, not in the head (That means between <body> and </body>

02-06-2004, 12:00 PM
was an oversight... but have updated, and it didn't make any differance...

could anyone explain the note on the authors link about the 5 spaces? i don't quite get which area he's talking about.

or if there anywhere in the code is a variable that defines the number of main links you can have?

02-06-2004, 12:32 PM
it should have been places not place.

what it does is make an indent on 5 space ' ' for each depth.

Thats the five spaces

02-06-2004, 12:38 PM
ok, so if i want the indent larger i should just change the 5 to 6 or so?

any idea for my listing problem though?

02-06-2004, 12:57 PM
Yes that should work, the menu don't seem to have problem with multiple foldouts under 1 foldout.
The menu it self in my opinion is quite bad though since it reloads for ever click making it very blinking, only plus is that it remembers the foldout.

02-06-2004, 01:00 PM
any suggestions to one i can use then?

so you can see about 7-8 foldout links under mousendk?
or just two?

only took it because it didn't require me to upload any .js scrips to my server.... *S*

02-06-2004, 02:06 PM
I can see 6, 5 in the top 1 in the bottom

clair de lune
02-06-2004, 09:42 PM
i use tigra tree menu, but javascript

free at

softcomplex.com (http://www.softcomplex.com/products/tigra_tree_menu/)

seems to do the same as you intend