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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:59

menu highlighting on viewed page (menu "memory")


Poster: ronnie
Dated: Sunday November 2 2003 - 20:04:38 GMT

well, what i mean to ask is this:
when clicking on a menu and after the page reloads, the menu shows the selected menu item in a different "on" style.

(e.g.: when clicking on "support/about milonic" at http://www.milonic.com, you will get the "support" and "about milonic" items highlighted on the menu).

it seems to me this works by using the page URL, since when opening the target in an iframe it doesn't remember my menu clicks. i'm using a custom made function which replaces the "openIFrame" function given on the site, so this could be the problem (donno, haven't tried openIFrame).

if this is indeed the solution, and since my custom made func does a little more than just handle clicks, would it be possible access the menu's memory property directly?

p.s. - couldn't find any documentation about this feature..


10x, r. ;)


Poster: Hergio
Dated: Sunday November 2 2003 - 20:50:51 GMT

Can't do it, it depends on the URL of the page you are currently viewing. Updating the URL of the iframe won't tell the menu to change its highlighted menu item. I touched on this in this topic.... http://www.milonic.com/forum/viewtopic.php?t=2959

But maybe someday...


Poster: ronnie
Dated: Sunday November 2 2003 - 20:56:37 GMT

heya,

you reckon there's some possible workaround here?
can't i "lie" to milonic about the URL or change the document URL w/o refreshing?

oh, what happens if i have the SAME URL in all menu items? will it highlight all of them or just the later one?


anyways, many thanks for the help,
r. :)


Poster: Hergio
Dated: Monday November 3 2003 - 15:07:35 GMT

Yes if you have all the URLs the same and you are currently viewing that URL, all the menu items that have matching URLs to the current will have highlights. This is because if you have a page listed in two menu items in two different menus on a page, both menu items will be highlight to let you know you can get to that page from either menu.

Regarding lying to it? Ehh, I am really not sure. I THINK the menu parses up the current page's URL at load time and then as it creates the menu's it changes the color of them based on the match. So I dont know if changing the page's URL after the fact will update the menu. Andy may have to chime in here to inform us of an API the menu may have exposed that would allow you to dynamically change the highlights. Like andy, is there a menu array index/position property that we can twiddle with to change whether a menu item is highlighted or not? Is so, then I think we may be able to dynamically change the colors of menu items on the fly! Wouldn't that be great.


Poster: ronnie
Dated: Tuesday November 4 2003 - 0:34:18 GMT

i'm counting on you here, boy!
nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy, nag Andy!

:D