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

SOLVED - Disappearing First Menu After Adding Second Menu


Poster: davebarnes
Dated: Friday June 8 2007 - 22:22:54 BST

If you surf to http://www.coloradohipresurfacing.com you will see a Milonic Menu in the upper left corner and a text menu in the bottom footer.

I wanted to have the footer contain a Milonic Menu so I created http://www.coloradohipresurfacing.com/E ... /Test.html

But, when you surf to the test page there are 2 problems:

1. The main menu has disappeared

2. The menu in the footer is not centered.

If you refresh the page all is well.

I created 2 _data.js files.
I created different styles in each files.
I added buildAfterLoad=true; to each.

So, obviously I did something wrong. But, what?


Poster: Ruth
Dated: Friday June 8 2007 - 23:32:34 BST

Hi Dave,

I think it might be using the new method since you have two files to call. If I read the directions correctly you have to call the program files with the data files in each cell but that may be causing a problem calling them twice.

I suggest you try the old method. I put the stuff together for you since I had to do it to test it :) You'd call the program files and the subs/style data file right after the body tag, and then the left main menu and the footer main menu files in their respective table cells.

The subs and style data would be

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(MainMenuStyle=new mm_style()){
fontfamily="Arial, Helvetica, sans-serif";
fontsize="9pt";
fontstyle="normal";
fontweight="bold";
offbgcolor="white";
offcolor="#666666";
onbgcolor="white";
oncolor="#770032";
pagecolor="#770032";
padding="0px 0px 8px 0px";
}

with(MainSub1MenuStyle=new mm_style()){
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
fontfamily="Arial, Verdana, Tahoma";
fontsize="8pt";
fontstyle="normal";
offbgcolor="#FFFFFF";
offcolor="#ff0000";
onbgcolor="#FFFFFF";
oncolor="#FFFFFF";
padding="0px 0px 8px 0px";
}

with(FooterMainMenuStyle=new mm_style()){
fontfamily="Arial, Helvetica, sans-serif";
fontsize="8pt";
fontstyle="normal";
fontweight="normal";
offbgcolor="white";
offcolor="#666666";
onbgcolor="white";
oncolor="#770032";
pagecolor="#770032";
padding="0px 0px 0px 0px";
}

with(FooterSub1MenuStyle=new mm_style()){
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
fontfamily="Arial, Verdana, Tahoma";
fontsize="8pt";
fontstyle="normal";
offbgcolor="#FFFFFF";
offcolor="#FFFFFF";
onbgcolor="#FFFFFF";
oncolor="#FFFFFF";
}

with(milonic=new menuname("Contact")){
style=MainSub1MenuStyle;
top=268;
aI("text=Map;url=/English/Miscellaneous/Map_Directions.html;");
}

with(milonic=new menuname("Test")){
style=FooterSub1MenuStyle;
aI("text=Map;url=/English/Miscellaneous/Map_Directions.html;");
}
drawMenus();


This your FooterMain_data.js file

Code:
with(milonic=new menuname("Footer Menu")){
alwaysvisible=1;
style=FooterMainMenuStyle;
position="relative";
orientation="horizontal"
aI("text=HOME;url=http://www.coloradohipresurfacing.com/;");
aI("text= | ;");
aI("text=ABOUT DR. RECTOR;url=/English/Company/About_JamesRector.html;");
aI("text= | ;");
aI("text=HIP RESURFACING;url=/English/Medical/Hip_Resurface_for_You.html;");
aI("text= | ;");
aI("text=EDUCATION;url=/English/Miscellaneous/Patient_Education.html;");
aI("text= | ;");
aI("text=FORMS;url=/English/Miscellaneous/Required_Forms.html;");
aI("text= | ;");
aI("text=DISCALIMER;url=/English/Miscellaneous/disclaimer.html;");
aI("text= | ;");
aI("text=CONTACT;url=/English/Miscellaneous/Contact_Us.html;");
aI("text= | ;");
aI("showmenu=Test;text=APPOINTMENT;url=/global-cgi-bin/cgiwrap/hiphost/start.cgi/HTMLOS_Pages/Request_Appointment.html?SourceCode=Footer;");
}
drawMenus();


And your LeftMain_data.js file

Code:
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
style=MainMenuStyle;
position="relative";
aI("text=HOME;url=http://www.coloradohipresurfacing.com/;");
aI("text=ABOUT DR. RECTOR;url=/English/Company/About_JamesRector.html;");
aI("text=HIP RESURFACING;url=/English/Medical/Hip_Resurface_for_You.html;");
aI("text=PATIENT EDUCATION;url=/English/Miscellaneous/Patient_Education.html;");
aI("text=REQUIRED FORMS;url=/English/Miscellaneous/Required_Forms.html;");
aI("text=CONTACT US;url=/English/Miscellaneous/Contact_Us.html;");
aI("text=SCHEDULE APPOINTMENT;url=/global-cgi-bin/cgiwrap/hiphost/start.cgi/HTMLOS_Pages/Request_Appointment.html?SourceCode=MainMenu;");
}
drawMenus();




Ruth


Poster: davebarnes
Dated: Saturday June 9 2007 - 3:48:45 BST

Ruth,

You are so great!

I followed your thought, but not the exact coding. I did not change my _data.js files at all.

I put this in the <head>:
Code:
<!-- Milonic DHTML Website Navigation Menu Version 5.0  Please visit http://www.milonic.com/ for more information. -->
<script language="JavaScript" src="/javascript/Milonic/milonic_src.js" type="text/javascript"></script>
<script language="JavaScript" src="/javascript/Milonic/mmenudom.js" type="text/javascript"></script>


Then, I put this in the main body to create the upper-left menu:
Code:
<script language="JavaScript" src="/javascript/Milonic/MainMenu_data.js" type="text/javascript"></script>


And, this in the footer:
Code:
<script language="JavaScript" src="/javascript/Milonic/FooterMenu_data.js" type="text/javascript"></script>


So, the main principles are:
1. One call to src and com
2. Two calls to the _data.js
3. It can't hurt to keep your styles unique. And, in the long run, is easier on the maintenance brain.

thanks (a lot),
dave


Poster: Ruth
Dated: Saturday June 9 2007 - 4:28:38 BST

Hi,

The only thing I'm not sure about is putting the program calls in the head. I know in the old method they needed to be the 1st thing after the body tag and would be the first object built before anything else.

Ruth