Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Need a function to "select" a node
valinotea
Junior Member

Posts: 3
Registered: 9/7/2006
Member Is Offline
posted on 9/7/2006 at 09:09 AM Reply With Quote
Need a function to "select" a node


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.

For instance, if the user navigates to "Contact Us", when contact.html loads, this little piece of JavaScript in the HTML would select that node (bolding it and displaying the appropriate icon).

HOME
-About
-Portfolio
-item1
-item2
-Contact Us

Thanks in advance
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/7/2006 at 10:48 AM Reply With Quote

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/
View User's Profile View All Posts By User U2U Member
valinotea
Junior Member

Posts: 3
Registered: 9/7/2006
Member Is Offline
posted on 9/7/2006 at 12:16 PM Reply With Quote

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)
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/8/2006 at 12:02 AM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
valinotea
Junior Member

Posts: 3
Registered: 9/7/2006
Member Is Offline
posted on 9/8/2006 at 08:33 AM Reply With Quote

I'm considering getting the Pro version, which likely will solve my issues.

Thanks.
View User's Profile View All Posts By User U2U Member
Sjodan
Newbie

Posts: 1
Registered: 3/22/2007
Location: Sweden
Member Is Offline
posted on 3/22/2007 at 03:36 PM Reply With Quote

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[0]" should read "o_tree.a_index[ + i + ]a_config[0]"
(again, imagine the spaces and + are not there).

Just look over the code and make sure that the iterations acctually iterate.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos:
Frames targeting
Win help style
Free Download Free Download
Free Download Menu Builders
Online Builder
Product Documentation Documentation:
Documenation Page
Support Forum Technical Support
Support Forum
   

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004