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:00

Forcefully setting pageonclass


Poster: digitalpacman
Dated: Saturday July 15 2006 - 4:20:09 BST

Hi, (NOTE: I rewrote my entire post to hopefully portray what I want)

Simply put, I have too many pages to which I want an item to be styled with a class than I could possibly fit into the pagematch property. I'm talking 200+ pages. As you can guess, this could generate an enourmously large jscript file, and probably slow it down too (thats if you allow multiple URLs for the pagematch property.

I want to either disable the style changes for a particular set of items, or set the class to be the onclass every time something occurs on the menu. What I've accomplished so far is the latter, everytime the menu closes or the mouse is moved over an item I set the className for all IDs that I want. This is working. However, the ID's the menu use for the TD element of each item are meaningless. I need to be able to make them match with what goes inside the menu. So instead of el125, it needs to be el509. I've been looking at the source code but every edit I make destroys the menu.

Any help?


Overview:

Menu..

--
ItemA
SubItemAA
SubItemAB
ItemB
SubItemBA
ItemC
--
When the user is on the page /1,2,3,4,5,6,7,8,9,10...200.html THEN
Highlight ItemA, SubItemAA <-- this should never become unhighlighted.. just like the pageonclass works.



Code:
function customoff() {
   document.getElementById("el115").className = "nav_selected"; // This is the AA
}

function showmenu() {
   with(milonic=new menuname("m495")){
      style=navStyle1;
      itemwidth=130;
      alwaysvisible=1;
      orientation="vertical";
      position="relative";
      aI("text=AA;url=SearchResults.asp?Cat=495;showmenu=m533;");
      aI("text=sdasfd;url=SearchResults.asp?Cat=537;showmenu=m541;");
      aI("text=B;url=SearchResults.asp?Cat=492;showmenu=m502;");
   }
   drawMenus();
}


with(navStyle1=new mm_style()){
onclass="nav_selected"
offclass="nav"
bordercolor="#000000";
borderstyle="solid";
borderwidth=0;
separatorcolor="#000000";
separatorsize="1";
padding=0;
fontsize="11";
fontstyle="normal";
fontweight="bold";
fontfamily="Arial";
offfunction="customoff();"
onfunction="customoff();"
}
with(subNavStyle1=new mm_style()){
onclass="nav_selected subnav_selected"
offclass="nav subnav"
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
separatorcolor="#000000";
separatorsize="1";
padding=0;
fontsize="11";
fontstyle="normal";
fontweight="bold";
fontfamily="Arial";
offfunction="customoff();"
onfunction="customoff();"
}



with(milonic=new menuname("m506")){
style=subNavStyle1;
aI("text=B1&nbsp;&nbsp;&nbsp;;url=SearchResults.asp?Cat=506;showmenu=m508;");
}

with(milonic=new menuname("m505")){
style=subNavStyle1;
aI("text=B2&nbsp;&nbsp;&nbsp;;url=SearchResults.asp?Cat=505;showmenu=m507;");
}


Poster: Ruth
Dated: Sunday July 23 2006 - 23:14:23 BST

Hi,

I don't know if the following post will help you. This is pretty much beyond my capabilities, but I found two posts, one had to do with finding the x coordinant of an menu item and the dicussion had information on how the menus are id'd and also how menu items are id'd, so maybe it will tell you something about ids???
http://www.milonic.com/forum/viewtopic.php?p=15424


The other has to do with the id of the menus.

http://www.milonic.com/forum/viewtopic.php?p=27880

And, they may have nothing to do with what you need :oops:

Ruth