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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:06

Problems alignment menu with submenu


Poster: Emielio
Dated: Wednesday October 8 2003 - 10:47:45 BST

I've got a problem aligning the "header"-menu with the "body"-menu. First I'll give the URL:

http://home.wanadoo.nl/emielbekke/tmp/index2.html

My website in progress will use frames. So I've tried the original frames-script and it worked fine. But when I implemented the script into my website the submenu just moved to the left where it has to be under the head-menu :? . I think it's got something to do with the framesets, but I really can't find the solution.

Can anyone please help me... I'm desperate... :x [/url]


Poster: Hergio
Dated: Wednesday October 8 2003 - 13:35:42 BST

My firewall at work is preventing me from viewing it, but you might want to try changing the top and/or left values of your submenus. Because you are going across frames, the sub menu doesn't know where its parent is so it needs top and left coordinates. Your frameset sizes might not be the same dimensions as the sample so the menu doesn't line up correctly. Try changing those values and it may help.

Also you didnt mention what version of the menu you are using but if you are using version3 I would recommend upgrading to version 5 of the Milonic DHTML menu.


Poster: Emielio
Dated: Wednesday October 8 2003 - 14:15:20 BST

I'm using the Frames-version of DHTML-menu... don't think I can upgrade to version 5 can I ??

I also can't find the settings for the width of my submenus... I can adjust the main-width, but that doesn't help at all... If you're looking at my URL you'll find the script-files and het html-frameset:

http://home.wanadoo.nl/emielbekke/tmp/


Poster: Hergio
Dated: Wednesday October 8 2003 - 15:09:28 BST

Dont worry about the width of the items, just move them over. You should see from the examples you can set the top and left properties of a menu, they are like the first two commas after the menu name I think. You can just edit those to move the menu around.

Also, you are correct, frames are not supported by the version 5 Milonic DHTML Menu out of the box. But I threw together some steps and a little code and that allows you to use the version 5 in a frames site. You loose alittle functionality but it ain't bad. But its not supported by milonic, so don't ask for help on it, m'kay? ;)
http://www.milonic.com/forum/viewtopic.php?t=2753
The only reason I do it is to try and get as many people as possible to use the new version. Its a hell of alot easier to support.


Poster: fredlongworthhighschool
Dated: Wednesday October 8 2003 - 15:10:23 BST

You could use IFRAMES. It means a little bit of work in adding scroll prevention scripts to pages (although not essential), but it is worth it in the long run because you guarantee to get support as well as a faster menu.


Poster: Emielio
Dated: Wednesday October 8 2003 - 15:26:08 BST

Still can't find the right value where to change the width of the submenu... sorry about that... I don't understand what I'm doing wrong


Poster: Hergio
Dated: Wednesday October 8 2003 - 15:39:56 BST

By top and left I DO NOT mean width. I mean the position/coordinates of where the menu displays itself. Here is a copy of a menu definition for Milonic DHTML menu version 3 with comments to tell you where what does what.
Code:
addmenu(menu=[      // This is the array that contains your menu
"mainmenu",         // Menu Name - This is name of your menu
20,               // Menu Top - The Top position in pixels
200,            // Menu Left - The Left position in pixels
,               // Menu Width - Menus width in pixels
1,               // Menu Border Width
,               // Screen Position - "center;left;right;middle;top;bottom"
style1,            // Properties Array - this is set higher up, as above
1,               // Always Visible - visible at all time (1=on/0=off)
"left",            // Alignment - text alignment, left, right or center
,               // Filter - Text variable for setting transitional effects
,               // Follow Scrolling - follow the user down the screen (1=on/0=off)
1,                // Horizontal Menu - Tells the menu to become horizontal(1=on/0=off)
,               // Keep Alive -
,               // Position of TOP sub image left:center:right
,               // Set the Overall Width of Horizontal Menu to 100%
,               // Right To Left - . (1=on/0=off)
,               // Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
,               // ID of the div you want to hide on MouseOver (useful for hiding form elements)
,               // Background image for menu when BGColor set to transparent.
,               // Scrollable Menu
,               // Reserved for future use
,"Home","http://www.dynamicdrive.com",,"Back to the home page",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"News sites  ","show-menu=news",,"",1
,"Webmaster  ","show-menu=webmaster",,"",1
,"Downloads  ","show-menu=downloads",,"",1
,"Search  ","show-menu=search",,"",1
,"Other  ","show-menu=other",,"",1
])
Meun Top, Menu Left and Menu Width near the top are the three variables you need. On your menu, just count in however many commas they are and set the values there. Any more questions, let us know!


Poster: Emielio
Dated: Wednesday October 8 2003 - 15:48:49 BST

You're correct about the code in the frames_head_array.js. These functions are working just fine. But now I'm talking about the submenus, which is the frames_body_array.js-file. I've listed the code below...

Code:
timegap=500               // The time delay for menus to remain visible
followspeed=5            // Follow Scrolling speed
followrate=40            // Follow Scrolling Rate
suboffset_top=100         // Sub menu offset Top position
suboffset_left=100         // Sub menu offset Left position
Frames_Top_Offset=10       // Frames Page Adjustment for Top Offset
Frames_Left_Offset=-36      // Frames Page Adjustment for Left Offset



plain_style=[            // Menu Properties Array
"navy",                  // Off Font Color
"ccccff",               // Off Back Color
"FFEBCD",               // On Font Color
"4B0082",               // On Back Color
"000000",               // Border Color
12,                     // Font Size
"normal",               // Font Style
"bold",                  // Font Weight
"Verdana, Tahoma, Arial, Helvetica",   // Font
4,                     // Padding
"arrow.gif"               // Sub Menu Image
,                     // 3D Border & Separator
,"66ccff"               // 3D High Color
,"000099"               // 3D Low Color
]


addmenu(menu=["languages",
,,100,1,"",plain_style,,,effect,,,,,,,,,,,,
,"PHP", "history.php?tp=php",,,0
,"JSP", "history.php?tp=jsp",,,0
,"JavaScript", "history.php?tp=jscript",,,0
])


Can't find the coordinates anywhere... Or do I have to adjust the header-file ??