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: Control bg on open item
DWice
Junior Member

Posts: 2
Registered: 12/1/2006
Member Is Offline
posted on 12/1/2006 at 10:38 AM Reply With Quote
Control bg on open item


menu items:

Item 1 (has url, no children)
Item 2 (has url, no children)
Item 3 (no url, has children)
Item 3.1 (has url)
Item 3.2 (has url)
Item 3.3 (has url)

Item 3 is set to be open on menu build.

I want to be able to show a bg color on Item 3 when users navigate 3.1, 3.2, etc, but to disappear when users navigate to Item 1 or 2. The state of Item 3 appears to open, not open & selected, which makes sense since it has not been clicked.

Hope this makes sense.

David
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 12/2/2006 at 12:27 AM Reply With Quote

you can modify the tree's behavior in the handler of the open event. In the handler call .select() method and then return true to proceed to default onItemOpen handler.
View User's Profile View All Posts By User U2U Member
DWice
Junior Member

Posts: 2
Registered: 12/1/2006
Member Is Offline
posted on 12/5/2006 at 12:54 PM Reply With Quote
'Select' not working as expected.


I created the following function and tied it to the onItemOpen event.

function test(o_item){
var a_parent = o_item.o_parent;
if(a_parent.n_id == 5) {
a_parent.select();
}
return true;
}

It did nothing, even if I added alerts to it. Using the example below, I was clicking on 3.1, 3.2, etc...so figured since these are leaf items, they don't have an open event. I moved my function to the onItemSelect, and it then appeared to run (alerts showed), but the parent.select did not happen.
I am expecting that .select() will select the item as if I clicked on it. Is this correct?

When I click on it manually with my mouse, the background shows. I know the id (5) is correct.

Thanks for any suggestions.

David
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 12/5/2006 at 02:00 PM Reply With Quote

submit a support ticket attaching your files in the zip archive. We'll take a look. The problem may have something to do with multiple selections option.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


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