problem getting 2 menus on a page to work

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Elaine Shuman
Advanced
Advanced
Posts: 10
Joined: Wed Sep 10, 2003 7:49 pm

problem getting 2 menus on a page to work

Post by Elaine Shuman »

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=&nbsp;&nbsp;&nbsp;Facilities;url=http://inhouse.ori.org/admin/facilities/index.html;");
aI("text=&nbsp;&nbsp;&nbsp;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/web ... rvice.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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Hi Elaine,

You should probably have posted under version 5, nearly missed your post.

Lets see what we have here:

Code: Select all


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=&nbsp;&nbsp;&nbsp;Facilities;url=http://inhouse.ori.org/admin/facilities/index.html;"); 
aI("text=&nbsp;&nbsp;&nbsp;Fiscal; 
...etc 



Remove and Place this under your menustyle:

Code: Select all


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: Select all


top=155; 
left=0; 

Where are your images? Is this the correct path?

Code: Select all


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: Select all


<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
Elaine Shuman
Advanced
Advanced
Posts: 10
Joined: Wed Sep 10, 2003 7:49 pm

turn off border in image

Post by Elaine Shuman »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Most the styles can be seen here

http://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
Post Reply