Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:42

Is it possible to highlight main menu items from a submenu?


Poster: 4viggo
Dated: Saturday September 28 2002 - 9:39:18 BST

I would like to highlight the top menu (and the path all the way down) from accessing a page deep down in my submenu?

The "Current Page Item Font Color" and "background color" settings work fine for the menu items having no submenus but when accessing a page in a submenu it does not highlight the parrent top menu item.

Help!


Poster: Andy
Dated: Saturday September 28 2002 - 9:47:32 BST

There is a download at http://www.milonic.co.uk/menu/madtoaster_menu_3.5.02.zip that will do what you want.

Although not fully supported by Milonic this will appear as standard in version 4 later next year.

Regards
Andy


Poster: 4viggo
Dated: Saturday September 28 2002 - 12:20:09 BST

Thanks Andy :D

regards
4viggo

What do I need to do?


Poster: Stan
Dated: Tuesday March 4 2003 - 3:06:30 GMT

Hi:

I would like very much to reproduce this behaviour. Please tell me what is special about this menu_array.js file and produces this behaviour?

Stan :?


Poster: kevin3442
Dated: Tuesday March 4 2003 - 5:15:05 GMT

Hi Stan,

Hope you don't mind me jumping in. The changes do not affect the menu array file (your current menu_array.js will be just fine). The "mad toaster" functionality is produced by additional code in mmenu.js, added by another user. The download Andy provided will include a different mmenu.js file that you can try using. Note, however, that it is version 3.5.02, so it will not have the latest small changes from 3.5.03 - 3.5.12 (you can see the list of additions here).

Hope that helps,

Kevin

One little glitch...


Poster: Stan
Dated: Tuesday March 4 2003 - 5:22:48 GMT

Thanks for your reply Kevin,

I got it working fine now, except if I use a "swapimage" setting on a sub menu item (which I guess was the cause of my problem). Any fix or workaround would be greatly appreciated! :)

Stan


Poster: kevin3442
Dated: Tuesday March 4 2003 - 18:02:02 GMT

Stan,

What exactly happens (or doesn't) when you use a swapimage? Menu highlighting stops working? Can you provide a URL to the site in question?

Kevin


Poster: Stan
Dated: Tuesday March 4 2003 - 19:58:31 GMT

Kevin,

Sorry, this is not yet on air. I will try to upload as soon as possible, perhaps later this week.

In a simple two-level menu structure, if I use an entry like the following in a sub-menu:

Code:
,"<img src=menu315x15.jpg border=0>&nbsp;La fábrica de sueños","LaMatatena-470.htm",,"La fábrica de sueños",1


everything goes well, and the sub-menu of the page is highlighted in the main menu whenever the page is displayed.

In contrast, if I use the following entry:

Code:
,"<img src=menu315x15.jpg border=0>&nbsp;La fábrica de sueños","LaMatatena-470.htm swapimage=MatatenaRoja15.gif",,"La fábrica de sueños",1


the sub-menu of the current page is not highligthed in the main menu (but the whole menu is otherwise behaving correctly, including the image swapping).

Stan


Poster: Stan
Dated: Tuesday March 11 2003 - 14:34:52 GMT

Hi Kevin:

You can reproduce the problem simply by replacing the following entry in the menu_array.js file provided by madtoaster:

Code:
addmenu(menu=["m_company",,,120,1,"",style2,,"left",effect,,,,,,,,,,,,
,"&nbsp;&nbsp;&nbsp;&nbsp;Form","main_2_1.htm",,"Form",1
])


with this one:

Code:
addmenu(menu=["m_company",,,120,1,"",style2,,"left",effect,,,,,,,,,,,,
,"<img src=arrow.gif>&nbsp;&nbsp;&nbsp;&nbsp;Form","main_2_1.htm swapimage=arrowdn.gif",,"Form",1
])


Stan

P.S. The script seems to ignore that the url may be followed by alternate actions...


Poster: reds
Dated: Wednesday March 12 2003 - 15:50:37 GMT

Hi,
question :
is it possible to use the highlight current item when not all pages are set in thye root, but in separate folders ?

help would be greatly appreciated !!

Björn


Poster: Stan
Dated: Wednesday March 12 2003 - 17:56:01 GMT

reds wrote:
Hi,
question :
is it possible to use the highlight current item when not all pages are set in thye root, but in separate folders ?

help would be greatly appreciated !!

Björn


I am not sure that I use the best technique, but I use a different menu_array.js in each folder... somewhat cumbersome, but it works. :|

Stan


Poster: reds
Dated: Thursday March 13 2003 - 13:19:37 GMT

When you give your full path in the menu_array.js, you're able to use one menu_array.js


Poster: Stan
Dated: Friday March 14 2003 - 5:43:30 GMT

Thanks Reds, this works fine. :)

Stan

Current page not highlighted when loaded at an anchor


Poster: Stan
Dated: Friday March 14 2003 - 5:52:29 GMT

It seems that if a page is loaded at a specific anchor (page.htm#anchor), then the current page is not highlighted in the menu (in my case, the anchor is not specified in the menu, but in a link from another page). Anyone experienced the same behaviour?

Stan


Poster: Stan
Dated: Saturday March 15 2003 - 21:58:49 GMT

kevin3442 wrote:
Stan,

What exactly happens (or doesn't) when you use a swapimage? Menu highlighting stops working? Can you provide a URL to the site in question?

Kevin


Kevin,

Here is the url: http://www.lamatatena.org/

You will notice that the second-level menu items do not have any swapimage, because when I specify one they stop highlighting the main menu.

Stan

Doing an update ?


Poster: Romeo
Dated: Wednesday March 19 2003 - 16:32:38 GMT

Do you know if anyone has added the "mad_toaster" addition to the later versions of the mmenu.js file or is it a wait for version 4?


Poster: astoorian
Dated: Friday April 11 2003 - 20:12:35 BST

Andy wrote:
There is a download at http://www.milonic.co.uk/menu/madtoaster_menu_3.5.02.zip that will do what you want.

Although not fully supported by Milonic this will appear as standard in version 4 later next year.

Regards
Andy


I've tried using the madtoaster file but no joy. The problem is with any page located in a subdirectory of the root directory, I get no highlighting of either the submenu or top menu items for these pages.

The only semi-weird thing I think I'm doing is that I'm using 2 menu_array files -- the only difference between the 2 is the path names used for the images and urls. Because my server doesn't seem to support root-relative links (e.g. /img/image.gif) I'm using relative links (e.g. img/image.gif), so the menu_array file loaded for pages in the root directory has links like "img/image.gif", while pages in a subdirectory use a menu_array_1 file that specify "../img/image.gif"

Hope the preceeding makes sense. Any help would be appreciated. There is a test server at home.cogeco.ca/~gastoorian/home.htm. (note that below the top level of menus only the "submenu test" items actually point anywhere).


Poster: Stan
Dated: Friday April 11 2003 - 21:37:26 BST

Astoorian,

You seem to execute a version of mmenu.js (in your lib/java) that does not contain the madtoaster additions? I get a page not found on the other mmenu.js specified in your page.

Stan

P.S. I got this to work but only with root relative url's.


Poster: astoorian
Dated: Friday April 11 2003 - 23:06:11 BST

Stan,

Thanks for having a look. The mmenu.js there now does have the extensions, but maybe when you hit it I hadn't updoaded the new file yet. I fixed the other thing you mentioned as well, but still no highlight colour on subdirectory pages.

Gregg


Poster: Stan
Dated: Saturday April 12 2003 - 16:48:09 BST

Gregg,

Check this entry: http://www.milonic.co.uk/menu/forum/viewtopic.php?t=1667&highlight=highlight+path

Stan