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: Javascript-Command as menu item
MaxFromH
Junior Member

Posts: 9
Registered: 9/23/2005
Member Is Offline
posted on 9/23/2005 at 03:51 PM Reply With Quote
Javascript-Command as menu item


I would like to invoke a Javascript command instead of a href-Link. E.g., I would like to show the menu items, when the user clicks on the "closed folder"-item (like javascript: trees[0].toggle(1)).

What is the exact syntax for the menu item?
View User's Profile View All Posts By User U2U Member
MaxFromH
Junior Member

Posts: 9
Registered: 9/23/2005
Member Is Offline
posted on 9/23/2005 at 04:56 PM Reply With Quote

P.S. When I try

['Level 0 Item 1', "javascript: trees[0].toggle(1)",
['Level 1 Item 0', 'nul'],
['Level 1 Item 1', 0,
['Level 2 Item 0'],
.....

I get the IE error message "'trees.0' is null or no object."

What did I do wrong?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/26/2005 at 11:15 AM Reply With Quote

Check target frame setting (trees should be defined in the target frame).
View User's Profile View All Posts By User U2U Member
MaxFromH
Junior Member

Posts: 9
Registered: 9/23/2005
Member Is Offline
posted on 9/26/2005 at 01:49 PM Reply With Quote

Is there any code example available, how I can influence the menu in the "navigation"-frame from a javascript in the "content"-frame?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/27/2005 at 10:44 AM Reply With Quote

To access the trees array in 'content' frame try following model:
top.frames['navigation'].trees.toggle(1);
View User's Profile View All Posts By User U2U Member
MaxFromH
Junior Member

Posts: 9
Registered: 9/23/2005
Member Is Offline
posted on 9/27/2005 at 04:09 PM Reply With Quote

It works :-))

Thanks, Rock!
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