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: Thursday February 8 2018 - 06:02:27

Passing menu style parameters to a page

Poster: wendy
Dated: Wednesday August 27 2003 - 16:34:46 BST

I don't know if this is possible, but I thought I would ask and see.

I would like to pass a variable to a page that contains a menu. This variable would turn the color of one of the menu items to basically setting the oncolor parameter. This would save me having to make a separate menu for each page. The green color on the menu item helps the user to know which page they are on.

Any thoughts on this one?


Wendy 8O

Poster: topachou
Dated: Wednesday August 27 2003 - 17:47:59 BST

Yes it's possible. I did it and it works.

Here what Andy told me :

Version 5.0 has quite a complex structure and many of the properties can be changed on the fly using the _m() and _mi() arrays.

The only difficult part is getting the reference number of each item or menu.

_m() is the array for menus and _mi() is the array for menu items. Each menu item is numbered from 0 to the number of menu items the menu has. Once you know the item number you can change any of the properties like this.

_mi[20][7]="red" will change the offbgcolor for menu item number 20. You may then need to execute the itemOff function to activate the change, this will be itemOff(20)

There is a full list of each of the menu item properties and the associated number at

We hope to get a much more detailed demo of this posted soon.

Poster: Hergio
Dated: Thursday August 28 2003 - 4:08:02 BST

You could also utilize server side scripting. Given a parameter passed in, you could set a variable in ASP called vColor to a certain values, based on the parameter passed in. Then set oncolor to this value. I.e.

Code: Select all

if( Request("param1") == 1 )
    vColor = "#00ff00";
}else if( Request("param1") == 2 )
    vColor = "#ff0000";
    vColor = "#0000ff";

then in your menu_data.js file, it would be
oncolor = "<%=vColor%>";

Its not that hard if you've used ASP or PHP before. If you dont have such things available to you, your only bet is to go with what topachou mentioned, and get at the menu's innards.

Poster: wendy
Dated: Thursday August 28 2003 - 14:52:30 BST

Thanks so much guys! :D

I think the ASP technique would work well for me since I've written most of my database access code in ASP. I will give this a try and post back to let you know how it went.

Have either of you tried either the ASP or the integrated variable approach with your menus?


Poster: Hergio
Dated: Thursday August 28 2003 - 17:14:28 BST

Yes i do it for permissions...
Basically I grab their user ID and then in the menu I say

Code: Select all

if( 'adminBob' == Request.ServerVariables('LOGON') )
<% }

Its quick and dirty, but its until I get a SQL backend to render it.