Collapsing menu: open link on click - open menu on imagclick

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
lfyrilei
Beginner
Beginner
Posts: 5
Joined: Thu Jun 10, 2004 8:44 pm

Collapsing menu: open link on click - open menu on imagclick

Post by lfyrilei »

I have some trouble getting this to work:
I have a collapsing menu with 3 depths of submenus. when a user for instance click on menutab "News" I want this to be a link to page "News", but if user click on my arrow image beside "news" I want all submenus and sub-submenus of "News" to unfold. Is this possible?

example:
News »
where "News" opens http://something/
and "»" unfolds sublevel1, sublevel2-a etc.
Sports »
Culture »
etc »

Lars
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

As far as I know you can't do the two things in one aI string. The 'type' for the aI string is being set at type=treemenu to get it to function so that the menu items below shift down as the submenu opens. The type for a hyperlink is type=html and as far as I know you can't 'split' different parts of the aI string and set them to different types.
As to the second part of your question having all the submenus open, the only way I know to do that would be to put them all into one submenu. Since you want them all to open it would make more sense to have them all in one submenu. So, using the treemenu example, you have the main menu item Finance which has showmenu=finance. In that finance menu you have the item US Markets with showmenu=US Markets. You would combine the items from the US Markets submenu into the Finance submenu right below the item US Markets and put the bgcolor, color and separator color in each item. For example

Code: Select all

with(new menuname("Finance")){
	style = sub1Style;
	aI("text=US Markets;image=lblue_blip.gif;overimage=red_blip.gif;");
		aI("text=Market Snapshot;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
		aI("text=Market Movers;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
		aI("text=Word on The Street;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
		aI("text=Gainers/Losers;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
		aI("text=Most Actives;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
		aI("text=News;offbgcolor=#D6DDE6;offcolor=#000000;separatorcolor=#8EA2BB;url=#");
	aI("text=Portfolio;url=#");
	aI("text=Watch list;url=#");
	aI("text=Price Alert;url=#");
	aI("text=Sectors;url=#");
	aI("text=Advanced Chart;url=#");
	}
With that code when you click on the Finance it will open the combined menus with the look of having opened the two separate submenus.

Ruth
Post Reply