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:26
Can't Implement mmpagehighlighter.js
Poster: Koan
Dated: Monday November 19 2007 - 5:30:05 GMT
Hi,
The following test page link illustrates my inability to successfully implement mmpagehighlighter.js to highlight the selected (or prescribed) page link.
http://www.uujax.org/Design/MainNav/nav_menu_test.html
Thanks
Re: Can't Implement mmpagehighlighter.js
Poster: John
Dated: Monday November 19 2007 - 15:01:52 GMT
That's a 2-year old item, which I'm not sure is functional any more. Try pagecolor= described here.
Re: Can't Implement mmpagehighlighter.js
Poster: Ruth
Dated: Monday November 19 2007 - 18:33:52 GMT
Hi,
You'd need to have a color for it to use as highlight and you have both the pagebgcolor and the pagecolor set as blank which means no color, pagecolor=""; so even if it were working, it wouldn't change anything since there is no color specified as the highlighting.
It is working, but it seems it needs a mouse event for it to work. I'll report it to Milonic.
Try the demo and you will see that it works but only after mousing over the item.
http://support.milonic.com/demos/mmpage ... /index.htm
This is not usually needed unless you are trying to get page highlighting to work when going to the page by a method other than the menu. Using pagebgcolor and pagecolor and any of the other page properties will highlight the menu item when the page matches the item.
Ruth
Re: mmpagehighlighter.js : requires moseover to highlight ??
Poster: Koan
Dated: Tuesday November 20 2007 - 2:54:55 GMT
Thanks Ruth,
With the pagecolor and pagebgcolor populated, I get exactly the function I wanted, including ability to specify a different "selected" color combination -- all except for the unexpected need to mouseover ( OUCH, so close !! )
I used the mmItemActivateByText function because most of my level-one links have no child pages (so no "showmenu"), and a few have just one submenu level. For those with submenus I want to highlight the level-one (section) link for any subordinate page loaded.
And, highlighting a page called from other than the main navigation is actually a major requirement -- I have internal page links in context throughout the site. When a level-one or level-two page is called from one of these links, the "olnoad" for that page would trigger a highlight of a specified level-one menu link.
Since, as you say, the function should work without the mouseover event, I hope to hold out for a fix of mmpagehighlighter.js if you think one is forthcoming (has it become incompatible with the current menu build?). I hope they will address it -- the other solutions mentioned don't seem to give me flexibility to highlight the level-one link for each of a set of subordinate pages.
Is specifying "pagematch=url" in "onload" an option?
Cheers, Koan
==================================================
Ruth wrote:
Hi,
You'd need to have a color for it to use as highlight and you have both the pagebgcolor and the pagecolor set as blank which means no color, pagecolor=""; so even if it were working, it wouldn't change anything since there is no color specified as the highlighting.
It is working, but it seems it needs a mouse event for it to work. I'll report it to Milonic.
Try the demo and you will see that it works but only after mousing over the item.
http://support.milonic.com/demos/mmpage ... /index.htm
This is not usually needed unless you are trying to get page highlighting to work when going to the page by a method other than the menu. Using pagebgcolor and pagecolor and any of the other page properties will highlight the menu item when the page matches the item.
Ruth
You'd need to have a color for it to use as highlight and you have both the pagebgcolor and the pagecolor set as blank which means no color, pagecolor=""; so even if it were working, it wouldn't change anything since there is no color specified as the highlighting.
It is working, but it seems it needs a mouse event for it to work. I'll report it to Milonic.
Try the demo and you will see that it works but only after mousing over the item.
http://support.milonic.com/demos/mmpage ... /index.htm
This is not usually needed unless you are trying to get page highlighting to work when going to the page by a method other than the menu. Using pagebgcolor and pagecolor and any of the other page properties will highlight the menu item when the page matches the item.
Ruth
Re: Can't Implement mmpagehighlighter.js
Poster: Ruth
Dated: Wednesday November 21 2007 - 19:06:51 GMT
Hi,
I don't know about pagematch and onload. I've read over what you said, and I'm not really sure I understand what you want. I think you are saying that on those main menu items that don't have submenus you want them to highlight when you click them and go to the page. That doesn't need anything but the page properties. If your link is page1 and you go to page1 then the item you clicked to get there will be highlighted if you have the page properties set. If you are saying that you want that to highlight on any page that is related to that particular topic, say the Item says Help and you click it and then on the help page you click some secondary link to go to another more specific help section page, you can do that with the page properties, if you have all the help pages in their own folder. You would do it by setting in that main menu item a pagematch to the folder. So, let's say your main menu item says Help and the url is /help/helpmain.htm, if you set aI as
Code:
aI("text=Help;url=/help/helmain.htm;pagematch=/help/;");
Then whenever you were on any page in that help folder the main menu item Help would be highlighted, even if you got to the pages from a link on some page.I hope that made sense. I'm not really sure what it is you want to happen on the highlighting. If the level one item doesn't have a child page, then I'm not sure why it's there. I would think you had a url in it or a showmenu or both. So, I think I'm not really understanding what you mean
Ruth