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

OnmouserOver-Event, openstyle


Poster: Natascha
Dated: Thursday January 5 2006 - 10:53:39 GMT

Hi all,

i have two questions:

1. I am trying to implement an onmouseover-effekt in my menu.

Code:
aI("showmenu=Produkte;text=Produkte;url=products.htm;target=mainFrame");


I want to open the target products.htm while going with the mouse over the link.

is this possible?

2. question:
if i open my menus with openstyle="up" sometimes i cant see my main-menu... is it possible to enter a code so that the menu opens up and right? --> to the right side of the horizontal-menu??

thanks for your help...

onmouseover


Poster: Migru
Dated: Thursday January 5 2006 - 12:36:47 GMT

Hi

it is always better, to provide a url - testpage
where the issue can be studied.

You are working with frames, is that correct ? Please specify your question and provide a url. Thats better.
Michael

Activating functions on mouseover
http://www.milonic.com/menusample15.php
popup function sample
http://www.milonic.com/menusample24.php
another possibility is to display an overimage only with an offset somewhere on the page.


Poster: Natascha
Dated: Thursday January 5 2006 - 12:39:37 GMT

sorry - here is my example-page:

http://www.hmk.de/test

i am working with frames - but i did not manage the frame-menus - so i changed it simply to openstyle"up".. :D


Poster: Natascha
Dated: Thursday January 5 2006 - 12:46:15 GMT

Natascha wrote:
sorry - here is my example-page:

http://www.hmk.de/test

i am working with frames - but i did not manage the frame-menus - so i changed it simply to openstyle"up".. :D



i tested the onmouse-over... but i am sure i used it wrong...

Code:
aI("showmenu=Produkte;text=Produkte & Geschäftsbereiche;url=javascript:onmouseover(products.htm);target=mainFrame");


Poster: Ruth
Dated: Thursday January 5 2006 - 14:48:03 GMT

Natascha wrote:
....

i am working with frames - but i did not manage the frame-menus - so i changed it simply to openstyle"up".. :D


Did you take a look at the demo for frames? It has an in depth explanation.

http://support.milonic.com/demos/frames/index.htm

As to the other, I think you need a function to tell the menu to open the link on mouseover and I think, this is not anything I know much about, but I think the function has to include a place to put the url/target, rather than using the target= feature of the menu.

Ruth

onMouseover


Poster: Migru
Dated: Thursday January 5 2006 - 20:53:58 GMT

Hi

it is not really clear, what your intention is,

do you just want to ad a link to a menu item - at the same time "showmenu" the submenu-items ?

Quote:
aI("text=Sample Link;url=index.html;showmenu=submenu");

http://www.milonic.com/menufaq.php

Had a brief look on your menudata file, so some of the menu items are working and there should not be any difficulty to do it in the same way with the others.

Michael


Poster: Ruth
Dated: Thursday January 5 2006 - 22:42:31 GMT

Hi Michael,

You know when you have an html link on a page you can do a javascript and have the link work when you mouseover it instead of when you click it? Usually it either takes you to the page, opens it in a new window, or can open it in a frame. For example, assume a frameset with a top frame named Nav and bottom named Content. You could create a link in Nav to test.html page and have it open in the content frame onmouseover.

Code:
<a href="test.html" onmouseover="parent.Content.location='test.html';">test mouseover</a>



In this case I think Natascha wants to be able to mouseover the Produkte & Geschäftsbereiche and have the submenu open as it does and also have the page open in the mainFrame at the same time. I don't know how to change the link I posted to get it to work in the url= parameter of the menu.


Ruth


Poster: Natascha
Dated: Monday January 9 2006 - 13:33:54 GMT

thanks for your answers - but i had to change my menu a little bit.

now i am opening another menu after clicking on the button "produkte" but with my mozilla-browser there seems to be a problem.

maybe someone with mozilla can have a look at my second menu after clicking on produkte? i tried it with the itemhigh-option but the vertical-menu is still to big...

thanks for your help..

http://www.hmk.de/test

itemheight


Poster: Migru
Dated: Monday January 9 2006 - 14:52:25 GMT

Hi

Place

itemheight=25;

into your menu (mainmenu code, submenu code)
Something like this:

with(milonic=new menuname("SubMenu")){
style=menuStyle;
itemheight=25;
itemwidth=100;


Please see:
http://www.milonic.com/itemproperties.php
http://www.milonic.com/beginner.php

Michael


Poster: Natascha
Dated: Monday January 9 2006 - 14:57:33 GMT

thanks - i did it - but it did not change..


Code:
alwaysvisible=1;
left=0;
top=110;
orientation="vertical";
style=menuStyle;
itemheight=25;
itemwidth=100;


Poster: Migru
Dated: Monday January 9 2006 - 15:15:43 GMT

Hi

Just downloaded your code

Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
fontfamily="Trebuchet MS";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#339933";
offcolor="#ffffff";
onbgcolor="#339933";
oncolor="#eeeeee";
<!--menubgimage="sheet.gif";-->
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#339933";
pagecolor="white";
separatorcolor="#ffffff";
separatorsize=1;
separatorpadding=1;
subimage="arrow.gif";
subimagepadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=0;
top=110;
orientation="horizontal";
style=menuStyle;
menuwidth="100%";
menualign="left";
aI("text=Home;url=http://www.hmk.de/test;target=_parent");
aI("showmenu=HMK;text=Über uns;");
aI("text=Produkte & Geschäftsbereiche;url=products.htm;target=mainFrame");
aI("showmenu=Service;text=Service;");
aI("showmenu=Partner;text=Partner;");
}

<!--with(milonic=new menuname("Produkte")){
<!--style=menuStyle;
<!--openstyle="up";
<!--top="offset=1";
<!--aI("text=Storage & Data Management;url=storage.htm;target=mainFrame;");
<!--aI("text=Security & Access;url=security.htm;target=mainFrame;");
<!--aI("text=Turn Key & Media Lösungen;url=turnkey.htm;target=mainFrame;");
<!--aI("text=Produktpartner;url=partners.htm;target=mainFrame;");
<!--
}

with(milonic=new menuname("Service")){
style=menuStyle;
openstyle="up";
aI("text=Consulting;url=consulting.htm;target=mainFrame;");
aI("text=Support;showmenu=Supportsub");
aI("text=Operation;url=operations.htm;target=mainFrame;");
}

with(milonic=new menuname("Supportsub")){
style=menuStyle;
openstyle="up";
aI("text=Public;url=public.htm;target=mainFrame");
aI("text=Privat;url=private.htm;target=mainFrame;");
}

with(milonic=new menuname("Partner")){
style=menuStyle;
openstyle="up";
aI("text=Reseller;showmenu=Resellersub");
aI("text=Vendors & Supplier;url=vendors.htm;target=mainFrame;");
}

with(milonic=new menuname("Resellersub")){
style=menuStyle;
openstyle="up";
aI("text=Programm;url=programm.htm;target=mainFrame;");
}

with(milonic=new menuname("HMK")){
style=menuStyle;
openstyle="up";
aI("text=HMK Group;url=hmkgroup.htm;target=mainFrame;");
aI("text=Firmen;url=companies.htm;target=mainFrame;");
aI("text=Historie;url=history.htm;target=mainFrame;");
aI("text=Adressen;url=adresses.htm;target=mainFrame;");

}

drawMenus();



there is nowhere an "itemheight" property ??
And in javascript comments are better done that way

// comment in JavaScript

than HTML style

<!-- comment -->

Michael


PS I´m sorry, forgot

menu_data2.js

That is here

Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;




with(menuStyle=new mm_style()){
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
fontfamily="Trebuchet MS";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#339933";
offcolor="#ffffff";
onbgcolor="#339933";
oncolor="#eeeeee";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#339933";
pagecolor="white";
separatorcolor="#ffffff";
separatorsize=1;
separatorpadding=1;
subimage="arrow.gif";
subimagepadding=2;
itemheight=25;
itemwidth=100;

}



with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=0;
top=110;
orientation="vertical";
style=menuStyle;
itemheight=25;
itemwidth=100;

menualign="left";
aI("text=Storage & Data Management;showmenu=Storagesub");
aI("text=Security & Access;url=security.htm;target=_self;");
aI("text=Turn Key & Media Lösungen;url=turnkey.htm;target=_self;");
aI("text=Produktpartner;url=partners.htm;target=_self;");
}

with(milonic=new menuname("Storagesub")){
style=menuStyle;
itemheight=25;
itemwidth=100;
aI("text=Allgemein;url=storage.htm;target=_self");
aI("text=Backup & Recovery;url=backup.htm;target=_self");
aI("text=HSM;url=hsm.htm;target=_self;");
aI("text=HSM Customizing Tools;url=hsmcustom.htm;target=_self;");
aI("text=NAS Head;url=nashead.htm;target=_self;");
aI("text=Data & Resource Management;url=data.htm;target=_self;");
aI("text=Mail & File Archiving;url=mail.htm;target=_self;");
aI("text=Ausgewählte Hardware;url=hardware.htm;target=_self;");
}
drawMenus();



Pls call that second menu Main Menu2

At the moment cannot trace additional syntax errors.

Michael

menu in a table ???


Poster: Migru
Dated: Monday January 9 2006 - 15:31:00 GMT

I am not certain,

do you have the second menu placed in a table ?

If so, there will be always problems with different browsers, if you do not comply with certain necessary standards, Please see

http://www.milonic.com/menusample9.php


Michael

Menu in a table


Poster: Migru
Dated: Tuesday January 10 2006 - 21:25:32 GMT

just after the <body> tag place the code

Code:
<BODY bgColor="#cccccc">
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>   
<script   language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");      
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" language="JavaScript" src="menu_data2.js" ></SCRIPT>


The menu_data2.js file should contain everything, but not the main menu:
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;

with(menuStyle2=new mm_style()){
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
fontfamily="Trebuchet MS";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#339933";
offcolor="#ffffff";
onbgcolor="#339933";
oncolor="#eeeeee";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135,Strength=3)";
padding=4;
pagebgcolor="#339933";
pagecolor="white";
separatorcolor="#ffffff";
//separatorsize=1;
//separatorpadding=1;
subimage="arrow.gif";
subimagepadding=2;
}

with(milonic=new menuname("Storagesub")){
style=menuStyle2;
aI("text=Allgemein;url=storage.htm;target=_self");
aI("text=Backup & Recovery;url=backup.htm;target=_self");
aI("text=HSM;url=hsm.htm;target=_self;");
aI("text=HSM Customizing Tools;url=hsmcustom.htm;target=_self;");
aI("text=NAS Head;url=nashead.htm;target=_self;");
aI("text=Data & Resource Management;url=data.htm;target=_self;");
aI("text=Mail & File Archiving;url=mail.htm;target=_self;");
aI("text=Ausgewählte Hardware;url=hardware.htm;target=_self;");
}

drawMenus();



The main menu please place into "embedded_main_menu_2.js" data file:

Code:
with(milonic=new menuname("Main Menu2")){
position="relative";
alwaysvisible=1;
orientation="vertical";
style=menuStyle2;
menualign="left";
itemheight=25;
aI("text=Storage & Data Management;showmenu=Storagesub");
aI("text=Security & Access;url=security.htm;target=_self;");
aI("text=Turn Key & Media Lösungen;url=turnkey.htm;target=_self;");
aI("text=Produktpartner;url=partners.htm;target=_self;");
}

drawMenus();


(Please note Important completion there was
position="relative"; )


There, where you had all the milonic files and the (old) menu_data2.js file before, just place

<script type="text/javascript" language="JavaScript" src="embedded_main_menu_2.js" ></SCRIPT>

and you will see, in FF (Mozilla) and in IE, the menus look very similar, both with the correct itemheight.


Michael


Poster: Natascha
Dated: Thursday January 12 2006 - 9:58:37 GMT

thank you... i did it now - i only had to change a few script-tags in your code and now it works...

but the only problem now is that my left menu jumps relative to the size of the middle-table (you know what i mean?)

i tried to fix it with top=125 - but it still jumps - how can i fix my table???

thanks!!

Padding


Poster: Migru
Dated: Thursday January 12 2006 - 10:43:14 GMT

Hi

I think it is the PADDING in your css file

(in this case padding-left) which causes, that, in a TD cell your menu does not like to be positioned left .................

Michael


Poster: Natascha
Dated: Thursday January 12 2006 - 11:06:46 GMT

hi - i changed my style-sheet : td-> vertical-align=top...

now it works fine!!

THANKS