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:31
problem getting 2 menus on a page to work
Poster: Elaine Shuman
Dated: Saturday April 24 2004 - 0:59:07 BST
I have one menu that is attached to a table cell, so the menu style is in the html. The web page is on an intranet, so I can't show you what's happening. Neither menu shows on the page and the error messages I get are:
mm_style is undefined
and
menu_style is undefined
section in the table cell below:
[code]<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=0;
alwaysvisible=1;
orientation="vertical";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
position="relative";
aI("text=Admin;fontweight=bold;status=Back To Home Page;");
aI("text= Facilities;url=http://inhouse.ori.org/admin/facilities/index.html;");
aI("text= Fiscal;
...etc [/code]
The other menu has a different name and is called ramcoStyle and only contains the following in the .js file
with(milonic=new menuname("Ramco")){
style=ramcoStyle;
top=10;
left=300;
alwaysvisible=1;
orientation="vertical";
aI("showmenu=options;image=ramcoC.gif;");
}
with(milonic=new menuname("options")){
style=ramcoStyle;
aI("text=Login;url=http://ramcoweb.ori.org/rvw;");
aI("text=More Info;url=http://inhouse.ori.org/admin/fiscal/webpage/EmployeeSelfService.html;");
}
The script tags to the js files are in the Head of the page and look like this:
[code]
<SCRIPT language=JavaScript src="ramco/ramco_menu.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="ramco/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=ramco/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=ramco/mmenudom.js><\/scr"+"ipt>");
</script>[/code]
I hope this is clear enough. The example in the Beginner's Guide called "Styling the Menu - colors etc" is confusing me.
I am confused between
with(milonic=new menuname("Main Menu")){
style=menuStyle;
AND
with(mainStyle=new mm_style()){
thanks
Elaine
Poster: Maz
Dated: Saturday April 24 2004 - 3:15:38 BST
Hi Elaine,
You should probably have posted under version 5, nearly missed your post.
Lets see what we have here:
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=0;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Admin;fontweight=bold;status=Back To Home Page;");
aI("text= Facilities;url=http://inhouse.ori.org/admin/facilities/index.html;");
aI("text= Fiscal;
...etc
Remove and Place this under your menustyle:
Code:
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
If the menu is inside the table you probably don't need these, unless its this space between the table top and menu:
Code:
top=155;
left=0;
Where are your images? Is this the correct path?
Code:
aI("showmenu=options;image=ramcoC.gif;");
and not something like
/images/ramcoC.gif
from the root file.
I usually place a / on everything from the root after .org
Place the script tag just under the body tag
******HERE IS THE PROBLEM**********
1st line should be MILONIC_SRC.JS
........
.......
Last line should be RAMCO_MENU.JS
*********************************
Code:
<SCRIPT language=JavaScript src="ramco/ramco_menu.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="ramco/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=ramco/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=ramco/mmenudom.js><\/scr"+"ipt>");
</script>
Are you sure you have the correct paths?
according to this the file is at http://inhouse.ori.org/ramco/mmenuns4.js
written as: /ramco/mmenuns4.js
Sometimes its really unnecessary to place the menu in a table, usually it can be placed with top and left since its a layer above everything else, and still use the table background behind the menu. But I can't see it to know if its a good idea.
Hope this helps, post again if you still run into problems.
maz
turn off border in image
Poster: Elaine Shuman
Dated: Monday April 26 2004 - 17:25:51 BST
Thanks Maz,
Changing the order of js files in the script tag did the trick.
I have another question.
How do I set border =0 on my image?
[code]
aI("showmenu=options;image=http://inhouse.ori.org/ramco/ramcoC.gif;");
[/code]
Elaine
Poster: Maz
Dated: Monday April 26 2004 - 18:40:50 BST
Most the styles can be seen here
http://www.milonic.com/styleproperties.php
Ah, but I don't see an imageborder.
I don't have any border listed, so remove any border or borderstyle on that menu. If you have to have a border except for an image, then add the same where it indicates borderstyle or on-offborder to 0 on the image menu item. (changing the menu item bordersize from 1 to 0.)
You might have to read that slowly
maz