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:53
Page is loading 2 menus when embedded in table cell
Poster: psdbanana
Dated: Monday October 2 2006 - 13:55:50 BST
Hi,
I followed the guide on how to embed the DHTML menu in a table cell, but whenever I open the page, 2 menus appear (one in the cell and one at the top). I need to figure out why it is drawing the top menu and remove it. Here is the code from the html file:
Code:
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><center><a href="sitemap.htm">You have Javascript disabled. Please enable it or use the sitemap</a></center></noscript>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
<noscript><center><a href="sitemap.htm">You have Javascript disabled. Please enable it or use the sitemap</a></center></noscript>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
Code:
<div align="center">
<table border="0" width="768" cellspacing="1" cellpadding="0">
<tr>
<td colspan="3" align="center" bgcolor="#000000">
<font face="Verdana" color="#FFFFFF"><!--insert lakewood image--> Lakewood
school logo</font></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#000000">
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
aI("text=Home;showmenu=Home;");
aI("text=Pinellas County Schools;showmenu=Pinellas_District;");
aI("text=Lakewood High;showmenu=Information;");
aI("text=Academics;showmenu=Academics;");
aI("text=Athletics;showmenu=Athletics;");
aI("text=SLC;showmenu=SLC;");
}
drawMenus();
</script>
</font></td>
</tr>
<table border="0" width="768" cellspacing="1" cellpadding="0">
<tr>
<td colspan="3" align="center" bgcolor="#000000">
<font face="Verdana" color="#FFFFFF"><!--insert lakewood image--> Lakewood
school logo</font></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#000000">
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
aI("text=Home;showmenu=Home;");
aI("text=Pinellas County Schools;showmenu=Pinellas_District;");
aI("text=Lakewood High;showmenu=Information;");
aI("text=Academics;showmenu=Academics;");
aI("text=Athletics;showmenu=Athletics;");
aI("text=SLC;showmenu=SLC;");
}
drawMenus();
</script>
</font></td>
</tr>
And here is the code from menudata.js
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="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="spartan.gif";
subimagepadding=2;
}
with(milonic=new menuname("Lakewood High School")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("showmenu=Home;text=Home;");
aI("showmenu=Pinellas_District;text=Pinellas County Schools;");
aI("showmenu=Information;text=Lakewood High;");
aI("showmenu=Academics;text=Academics;");
aI("showmenu=Athletics;text=Athletics;");
aI("showmenu=SLC;text=SLC;");
}
with(milonic=new menuname("Home")){
overflow="scroll";
style=menuStyle;
aI("text=Lakewood Home Page;url=http://www.lakewood-hs.pinellas.k12.fl.us;")
aI("text=Lakewood Portal Server;url=http://portal.lakewood-hs.pinellas.k12.fl.us;")
}
with(milonic=new menuname("Pinellas_District")){
overflow="scroll";
style=menuStyle;
aI("text=PCSB Homepage;url=http://www.pcsb.org;")
aI("text=PCSB E-Mail;url=http://mail.pcsb.org/exchange;")
}
with(milonic=new menuname("Information")){
style=menuStyle;
aI("text=Administration;url=http://www.lakewood-hs.pinellas.k12.fl.us/admin.htm;");
aI("text=Faculty/Staff;url=http://www.lakewood-hs.pinellas.k12.fl.us/faculty.htm;");
aI("text=Students/Parents;url=http://www.lakewood-hs.pinellas.k12.fl.us/students.htm;");
aI("text=Calendar;url=http://www.lakewood-hs.pinellas.k12.fl.us/calendar.htm;");
aI("text=ESOL;url=http://www.lakewood-hs.pinellas.k12.fl.us/esol.htm;");
aI("text=Volunteers;url=http://www.lakewood-hs.pinellas.k12.fl.us/volunteers.htm;");
aI("text=Media Center;url=http://www.lakewood-hs.pinellas.k12.fl.us/mediacenter.htm;");
aI("text=Internet Agreement;url=http://www.lakewood-hs.pinellas.k12.fl.us/internetagree.htm;");
aI("text=About LHS External;url=http://www.lakewood-hs.pinellas.k12.fl.us/about.htm;");
}
with(milonic=new menuname("Academics")){
style=menuStyle;
aI("text=Curriculum;url=http://www.lakewood-hs.pinellas.k12.fl.us/curriculum.htm;");
aI("text=Course Guide;url=http://www.lakewood-hs.pinellas.k12.fl.us/courses.htm;");
}
with(milonic=new menuname("Athletics")){
style=menuStyle;
aI("text=Curriculum;url=http://www.lakewood-hs.pinellas.k12.fl.us/curriculum.htm;");
aI("text=Course Guide;url=http://www.lakewood-hs.pinellas.k12.fl.us/courses.htm;");
}
with(milonic=new menuname("SLC")){
style=menuStyle;
aI("text=Business and Technology;url=http://www.lakewood-hs.pinellas.k12.fl.us/bat.htm;");
aI("text=Center for Advanced Technologies;url=http://www.cat.pinellas.k12.fl.us/;");
aI("text=Program for Athletic Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pas.htm;");
aI("text=Program for Enviornmental Technologies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pet.htm;");
aI("text=Program in Cultural Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pics.htm;");
aI("text=Ninth Grade Community;url=http://www.lakewood-hs.pinellas.k12.fl.us/ngc.htm;");
}
drawMenus();
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="spartan.gif";
subimagepadding=2;
}
with(milonic=new menuname("Lakewood High School")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("showmenu=Home;text=Home;");
aI("showmenu=Pinellas_District;text=Pinellas County Schools;");
aI("showmenu=Information;text=Lakewood High;");
aI("showmenu=Academics;text=Academics;");
aI("showmenu=Athletics;text=Athletics;");
aI("showmenu=SLC;text=SLC;");
}
with(milonic=new menuname("Home")){
overflow="scroll";
style=menuStyle;
aI("text=Lakewood Home Page;url=http://www.lakewood-hs.pinellas.k12.fl.us;")
aI("text=Lakewood Portal Server;url=http://portal.lakewood-hs.pinellas.k12.fl.us;")
}
with(milonic=new menuname("Pinellas_District")){
overflow="scroll";
style=menuStyle;
aI("text=PCSB Homepage;url=http://www.pcsb.org;")
aI("text=PCSB E-Mail;url=http://mail.pcsb.org/exchange;")
}
with(milonic=new menuname("Information")){
style=menuStyle;
aI("text=Administration;url=http://www.lakewood-hs.pinellas.k12.fl.us/admin.htm;");
aI("text=Faculty/Staff;url=http://www.lakewood-hs.pinellas.k12.fl.us/faculty.htm;");
aI("text=Students/Parents;url=http://www.lakewood-hs.pinellas.k12.fl.us/students.htm;");
aI("text=Calendar;url=http://www.lakewood-hs.pinellas.k12.fl.us/calendar.htm;");
aI("text=ESOL;url=http://www.lakewood-hs.pinellas.k12.fl.us/esol.htm;");
aI("text=Volunteers;url=http://www.lakewood-hs.pinellas.k12.fl.us/volunteers.htm;");
aI("text=Media Center;url=http://www.lakewood-hs.pinellas.k12.fl.us/mediacenter.htm;");
aI("text=Internet Agreement;url=http://www.lakewood-hs.pinellas.k12.fl.us/internetagree.htm;");
aI("text=About LHS External;url=http://www.lakewood-hs.pinellas.k12.fl.us/about.htm;");
}
with(milonic=new menuname("Academics")){
style=menuStyle;
aI("text=Curriculum;url=http://www.lakewood-hs.pinellas.k12.fl.us/curriculum.htm;");
aI("text=Course Guide;url=http://www.lakewood-hs.pinellas.k12.fl.us/courses.htm;");
}
with(milonic=new menuname("Athletics")){
style=menuStyle;
aI("text=Curriculum;url=http://www.lakewood-hs.pinellas.k12.fl.us/curriculum.htm;");
aI("text=Course Guide;url=http://www.lakewood-hs.pinellas.k12.fl.us/courses.htm;");
}
with(milonic=new menuname("SLC")){
style=menuStyle;
aI("text=Business and Technology;url=http://www.lakewood-hs.pinellas.k12.fl.us/bat.htm;");
aI("text=Center for Advanced Technologies;url=http://www.cat.pinellas.k12.fl.us/;");
aI("text=Program for Athletic Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pas.htm;");
aI("text=Program for Enviornmental Technologies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pet.htm;");
aI("text=Program in Cultural Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pics.htm;");
aI("text=Ninth Grade Community;url=http://www.lakewood-hs.pinellas.k12.fl.us/ngc.htm;");
}
drawMenus();
I tried emitting one of the drawMenus() calls, but it doesn't seem to do anything.
Thank You.
Poster: John
Dated: Monday October 2 2006 - 16:03:14 BST
Even though you have them named differently, your "Main Menu" and "Lakewood High School" menus are essentially the same, but with different positioning.
Poster: psdbanana
Dated: Monday October 2 2006 - 17:31:41 BST
I understand what you are saying, but how do I eliminate the one outside of the cell from showing up when I load the page? I can't seem to figure out where it is loading the other menu from, except maybe the menu_data.js Even so removing one of the drawMenus() would have it not load the unwanted menu.
Poster: Ruth
Dated: Monday October 2 2006 - 17:34:30 BST
Hi,
Remove the Lakewood High School menu from the data file.
Code:
with(milonic=new menuname("Lakewood High School")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("showmenu=Home;text=Home;");
aI("showmenu=Pinellas_District;text=Pinellas County Schools;");
aI("showmenu=Information;text=Lakewood High;");
aI("showmenu=Academics;text=Academics;");
aI("showmenu=Athletics;text=Athletics;");
aI("showmenu=SLC;text=SLC;");
}
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("showmenu=Home;text=Home;");
aI("showmenu=Pinellas_District;text=Pinellas County Schools;");
aI("showmenu=Information;text=Lakewood High;");
aI("showmenu=Academics;text=Academics;");
aI("showmenu=Athletics;text=Athletics;");
aI("showmenu=SLC;text=SLC;");
}
Ruth
Poster: psdbanana
Dated: Monday October 2 2006 - 17:43:38 BST
heh I actually just realized that I was accidently declaring 2 menus (one inside the menu_data.js, and out in the html page) and removed the one from the javascript file. Then to realize that you posted the answer after I figured it out. Thanks anyway!