I have a requirement where there is a horizontal menu bar of width 765 pixes that is always shown in the page and I have embedded this menu inside a table. As the mouse is moved over to the items in the menu another horizontal scroolbar should be shown below the always shown one which should of the same length as the top one. Using the following code I was able to succesfully produce the end result in IE at different resolutions but when opened in Firefox or Netscape the 2nd horizontal menu bar is having the width as wide as my screen.
Here is the code from the html file that call menu_data.js
-----------------------------------------------------------------
Code: Select all
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="lines">
<div id="nav" name="nav">
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="https://milonic.com/">DHTML JavaScript Website Pull Down Navigation Menu By Milonic</a></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>
</div>
</td></tr>
</table>
</td>
------------------------------------------------------------------------------------
Code: Select all
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()){
borderwidth=0;
fontfamily="Verdana, Arial, Tahoma";
fontsize="71%";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#e5e5e5";
itemheight=22;
itemwidth=120;
offbgcolor="#e5e5e5";
offcolor="#666666";
onbgcolor="#666666";
oncolor="#ffffff";
padding=0;
pagebgcolor="#666666";
pagecolor="#ffffff";
separatorcolor="#ffffff";
separatorsize=4;
}
with(secondMenuStyle=new mm_style()){
align="center";
bordercolor="#666666";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Arial, Tahoma";
fontsize="71%";
fontstyle="normal";
fontweight="bold";
itemheight=22;
offbgcolor="#999999";
offcolor="#cccccc";
onbgcolor="#999999";
oncolor="#ffffff";
padding=0;
separatorcolor="#999999";
separatorsize=5;
}
with(milonic=new menuname("Main Menu")){
align="center";
alwaysvisible=1;
menualign="center";
orientation="horizontal";
position="relative";
style=menuStyle;
aI("text= type=header;itemwidth=15;offborder=1px solid #7d7d7d;");
aI("showmenu=FOR CANDIDATES;text=FOR CANDIDATES;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;url=file:///C:/Jeff/Copy_of_index_candel.html;onfunction=setMenuPosition('FOR CANDIDATES');");
aI("showmenu=FOR CLIENTS;text=FOR CLIENTS;offborder=1px solid #7d7d7d;onborder=0px solid #7d7d7d;");
}
with(milonic=new menuname("FOR CANDIDATES")){
align="left";
left="offset=0";
menualign="center";
menuwidth="100%";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=50";
aI("text= type=header;itemwidth='2%';");
aI("showmenu=SEARCH JOBS;text=SEARCH JOBS;url=http://milonic.com/cbuy.php;itemwidth='14%';");
aI("showmenu=SUBMIT RESUME;text=SUBMIT RESUME;url=http://milonic.com/cbuy.php;itemwidth='17%';");
aI("showmenu=BENEFITS PACKAGE;text=BENEFITS PACKAGE;url=http://milonic.com/cbuy.php;itemwidth='21%';");
aI("showmenu=CONTACT US;text=CONTACT US;url=http://milonic.com/cbuy.php;itemwidth='14%';");
aI("showmenu=RESUME TIPS;text=RESUME TIPS;url=http://milonic.com/cbuy.php;itemwidth='15%';");
aI("showmenu=INTERVIEW TIPS;text=INTERVIEW TIPS;url=http://milonic.com/cbuy.php;itemwidth='16%';");
aI("text= type=header;itemwidth='1%';");
}
with(milonic=new menuname("FOR CLIENTS")){
align="left";
left="offset=0";
menualign="center";
menuwidth="100%";
orientation="horizontal";
screenposition="center"
style=secondMenuStyle;
top="offset=50";
aI("text= type=header;itemwidth='2%';");
aI("showmenu=CORPORATIONS;text=CORPORATIONS;url=http://www.a-q.co.uk/;itemwidth='25%';");
aI("showmenu=LAW FIRMS;text=LAW FIRMS;url=http://www.sms2email.com/;itemwidth='20%';");
aI("showmenu=GOVERNMENT/NON PROFIT;text=GOVERNMENT/NON PROFIT;url=http://www.softidiom.com/?milonicmenu;itemwidth='30%';");
aI("text= type=header;itemwidth='23%';");
}
drawMenus();


