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

Drop-up Menu


Poster: robman69
Dated: Monday March 7 2005 - 20:28:49 GMT

I have a navigation bar at the bottom of my page and need to have a dynamic menu that opens upward when the user hovers the mouse cursor over the selection? I've been unable to get this to work so far and was wondering if anyone else has done something similar to this? Any help would be greatly appreciated........Rob


Poster: John
Dated: Monday March 7 2005 - 20:42:29 GMT

openstyle="up"; is a nice menu property!

Some reading is suggested... :)

Drop Up Menu...Please Help


Poster: robman69
Dated: Thursday March 10 2005 - 18:09:14 GMT

I have put the openstyle in there before, but it does not seem to work for me. I'm probably doing something wrong, but my menu file is below. I downloaded the latest version again today and tried, but it's not opening upwards. A sample of the web page I have is posted at http://66.64.192.170/MENUTEST/PE/home.htm . Use the bottom left link "Bending" and it is the bottom links I need to open up. Any help would be greatly appreciated!!! Thank You!



_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


with(menuCRCStyle=new mm_style()){
onbgcolor="#CC0000";
oncolor="#ffffff";
offbgcolor="#6B6E6F";
offcolor="#ffffff";
bordercolor="#6B6E6F";
borderstyle="solid";
borderwidth=1;
separatorcolor="#6B6E6F";
separatorsize="0";
padding=2;
fontsize="10";
fontstyle="normal";
fontfamily="Arial, Verdana, Tahoma";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#ffffff";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=70);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

with(milonic=new menuname("Contact")){
style=menuCRCStyle;
aI("text=E-mail;url=../contact.htm;status=E-mail");
aI("text=Locations          ;url=../locations.htm;status=Locations");
}

with(milonic=new menuname("Bending")){
style=menuCRCStyle;
openstyle="up";
aI("status=Milonic Home Page;text=Home;url=http://www.milonic.com/;");
aI("text=Pipe Bending Machines      ;url=bending.htm#pbm;status=Pipe Bending Machines;");
aI("text=Centurion Bending Machines      ;url=bending.htm#cbm;status=Centurion Bending Machines;");
}

drawMenus();


Poster: kevin3442
Dated: Friday March 11 2005 - 0:52:58 GMT

Hi Rob,

Thanks for providing a link. Just FYI, the url didn't work, but an all lower case version did.

I had a look at the example page. Generally speaking, you have openstyle="up" in the correct place. However, that only works when the menu in question is opened as a submenu, using the showmenu property from another menu item (i.e., from a parent item defined in menu_data). Your main menu is not a Milonic menu; it's built from images arranged in a table. Your submenus are Milonic menus that are opened relative to the images using the popup() function. The popup() function does not respond to openstyle.

The popup() function does, however, offer vertical and horizontal offsets (respectively, the third and fourth parameters passed in the function call). You could use a negative vertical offset to move the submenu up, relative to the bottom of its parent image (PE_r7_c1.jpg in this case). The value would be the height of the menu plus the height of the image, plus any gap you might lie between main and sub. E.g.,
Code:
onmouseover="popup('Bending','PE_r7_c1',-62)

Note the third parameter, -62, is an upward offset.

If you find differences across browsers, then you could get a little fancier and implement a function to adjust the offset based on the browser. You could also mak a general function that would get the height of the menu, and the height of the image and figure out the appropriate offset, in case you needed to do this for multiple submenus.

Hope that helps,

Kevin