Board Logo

Writing nodes to an excisting tree.
Dennus - 8/27/2002 at 07:10 PM


I like your tree script! I'dd like to use it for a remote script application.
The thing i'm asking myself is if it's possible to insert new items into an excisting node without parsing the entire tree again.
The reason i think it would not work is because all nodes are written to the page in one single run and you cannot write to an excisting page.
But maybe i've overlooked an option like writing to the

? Probably not?
Got some ideas?

Thankz Dennus.

tigra - 8/28/2002 at 06:58 AM

This is pretty challenging task but it is possible. You can submit customization request and we'll work on it providing you with some kind of API to manipulate nodes dynamically.

Dennus - 8/30/2002 at 06:16 PM


But i'm doing this as a home project hoping to score some points at college.

I found a solution myself though. I did it by writing out the script and providing every statement in the entire script with comments.
That way [hint to all other scripters] i now know how the script works.

Bassically i add instead of a link a structure to the initial array, providing it a foldername (on the server) and a property indicating there's more to load from the server.

I replaced the


'<a href="' + this.a_config[1] + '"

with a function call to the Remote Script call.

When the return loads I use the clicked item as a parameter to the loop doing new Tree_Item(ClickedItem,LoopCount).

Right now i'm implementing an onmousedown event handler for nodes so you can do a Explorer like popup on rightclicks.

When my page is done i'll post a link to it.


Back to forum: