What I am trying to do is call a small function, onLoad, that would "select" a particular node in my tree. Each page in our (non-profit) website
would need this small script -- only the node specified would be different from page to page. This would greatly simplify maintainence. BUT, I need
help writing the function.
This is an attempt to mimic some persistance so the user has the visual cue as to which page they're on when they get there.
Thanks in advance
here is the post with the sample of the function that searches for the items by name then opens and highlights it: http://www.softcomplex.com/forum/viewthread_3759/
Thanks for the reply.
But, no matter how I try calling the function you linked to, I get the following error:
'a_index.a_config.0' is null or not an object
I thought for example <BODY onLoad="setTree('Portfolio')> would work ("Portfolio" being one of the captions in my tree)
submit a support ticket attaching the demo of the problem in the zip package. we'll take a look and let you know where is the problem.
I'm considering getting the Pro version, which likely will solve my issues.
The reason you get the 'a_index.a_config.0' message when you try to use the setTree function as it is written in the thread linked above is that
this forum appears to remove the combination of [ + i + ] (imagine that the spaces and + are not there) in the text that is written.
The code as it is displayed on the forum is changed when it is posted and therefore turn out all wrong.
For instance the line "o_tree.a_index.a_config" should read "o_tree.a_index[ + i + ]a_config"
(again, imagine the spaces and + are not there).
Just look over the code and make sure that the iterations acctually iterate.