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

Undefined Submenu


Poster: frodo_trb
Dated: Wednesday July 9 2003 - 5:56:56 BST

I have been reconfiguring the menu_array.js file for a site I am working on. Everything is working fine, except that when I make the first menu a Home Page link, and not wanting any submenu's for it, it still lists a submenu of "undefined". Is there something I am missing and if so what do I need to do to correct this. See script posted below.

Thanks,

Frodo_trb

timegap=500 // The time delay for menus to remain visible
followspeed=10 // Follow Scrolling speed
followrate=50 // Follow Scrolling Rate
suboffset_top=5 // Sub menu offset Top position
suboffset_left=10 // Sub menu offset Left position



ScrollingSampStyle=[ // ScrollingSampStyle is an array of properties. You can have as many property arrays as you need
"666666", // Mouse Off Font Color
"ffffff", // Mouse Off Background Color (use zero for transparent in Netscape 6)
"ffffff", // Mouse On Font Color
"ff9933", // Mouse On Background Color
"666666", // Menu Border Color
"10", // Font Size (default is px but you can specify mm, pt or a percentage)
"normal", // Font Style (italic or normal)
"normal", // Font Weight (bold or normal)
"comic sans ms,verdana,helvetica",// Font Name
3, // Menu Item Padding or spacing
, // Sub Menu Image (Leave this blank if not needed)
0, // 3D Border & Separator bar
, // 3D High Color
, // 3D Low Color
, // Current Page Item Font Color (leave this blank to disable)
, // Current Page Item Background Color (leave this blank to disable)
, // Top Bar image (Leave this blank to disable)
, // Menu Header Font Color (Leave blank if headers are not needed)
, // Menu Header Background Color (Leave blank if headers are not needed)
, // Menu Item Separator Color
]


addmenu(menu=[
"FollowMain", // Menu Name - This is needed in order for this menu to be called
56, // Menu Top - The Top position of this menu in pixels
10, // Menu Left - The Left position of this menu in pixels
115, // Menu Width - Menus width in pixels
1, // Menu Border Width
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
ScrollingSampStyle, // Properties Array - this array is declared higher up as you can see above
1, // Always Visible - allows this menu item to be visible at all time (1=on or 0=off)
, // Alignment - sets this menu elements text alignment, values valid here are: left, right or center
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",// Filter - Text variable for setting transitional effects on menu activation - see above for more info
1, // Follow Scrolling Top Position - Tells this menu to follow the user down the screen on scroll placing the menu at the value specified.
0, // Horizontal Menu - Tells this menu to display horizontaly instead of top to bottom style (1=on or 0=off)
0, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on or 0=off)
, // Position of TOP sub image left:center:right
, // Set the Overall Width of Horizontal Menu to specified width or 100% and height to a specified amount
0, // Right To Left - Used in Hebrew for example. (1=on or 0=off)
0, // Open the Menus OnClick - leave blank for OnMouseover (1=on or 0=off)
, // ID of the div you want to hide on MouseOver (useful for hiding form elements)
, // Background image for menu Color must be set to transparent for this to work
0, // Scrollable Menu
, // Miscellaneous Menu Properties
,"Home","show-menu=Home","http://www.allenpagina.com",,0


addmenu(menu=[
"Home",
,
,
0,
1,
,
ScrollingSampStyle,
0,
,
"Fade(duration=0.2);Shadow(color=777777, Direction=135, Strength=5)",
0,
0,
0,
,
,
0,
0,
,
,
0,
,
])

dumpmenus();


Poster: SecretAgentWoman
Dated: Wednesday July 9 2003 - 13:38:27 BST

Code:
,"Home","show-menu=Home","http://www.allenpagina.com",,0


Well, you see, you told it to "show-menu=Home" ;)

The line should read:

Code:
,"Home","http://www.allenpagina.com",,,0


And you made a submenu for it, but you said you didn't want a submenu? Erase the "Home" submenu after changing the code above, it's not needed.


Poster: frodo_trb
Dated: Thursday July 10 2003 - 0:15:40 BST

SecretAgentWoman,

Thank you, I guess I must have missed something when I first tried this. I thought I had placed that code in the script, but must have missed something as I got a javascript error when I ran it, works fine your way.... :D

To many long hours I guess.....

Again thank you,

Frodo