|
Hi,
I really need the following menu working for both IE5.5 and netscape6 above. This menu also needs to position itself to the correct place when the browser is resized or viewed at different resolutions. If I place the parent menu in the center, the submenus dont move along with the parent menu. here is the link to it.
http://www.comriesoftware.net/codewidgets/CS0171/index.aspx
Can you please take a look and help me out. I am in deep deep trouble.
just giving me the code that will fix the cross browser issue and the browser positioning issue will help.
this menu is generated using asp.net. So the code now that is shown is the output. Address the issue for 1 single menu will work out.
thanks thanks thanks
<Script language='JavaScript'>
function SubMenu(Cell){
switch (Cell)
{
case S0:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S1:{
S1.style.display = 'inline'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S2:{
S1.style.display = 'none'
S2.style.display = 'inline'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S3:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'inline'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S4:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'inline'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S5:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'inline'
S6.style.display = 'none'
S7.style.display = 'none'
}
break
case S6:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'inline'
S7.style.display = 'none'
}
break
case S7:{
S1.style.display = 'none'
S2.style.display = 'none'
S3.style.display = 'none'
S4.style.display = 'none'
S5.style.display = 'none'
S6.style.display = 'none'
S7.style.display = 'inline'
}
break
}
}
</Script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>CodeWidgets.com Widget #CS0171 Databound Dynamic Vertical Menu (ASP.NET)</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="/forum/Styles.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form name="Form1" method="post" action="/forum/index.html" id="Form1">
<P>
<script language="javascript">
//// FUNCTIONS TO POPUP AND SWAP MENU ITEMS
function Hide(Cell){
Cell.style.display = "none"
}
function Show(Cell)
{
Cell.style.display = "inline"
}
function Swap(Cell){
switch (Cell.style.color){
case "":
{
Cell.style.color="white"
Cell.style.background="steelblue"
}
break
case "white":
{
Cell.style.color=""
Cell.style.background="whitesmoke"
}
break
default:
Cell.style.display = "none"
}
}
function NavTo(Loc){
window.location = Loc
}
</script>
<table id="S0" border="0" width="300" height="140" style="position: absolute; left: 10; top: 0; z-index: 0" onMouseOver="SubMenu(S0)" onMouseOut="SubMenu(S0)">
<tr>
<td width="100%"></td>
</tr>
</table>
<span id="Uc_vMenu1_lblMenu"><TABLE onMouseOver=SubMenu(S1);Swap(this) onMouseOut=Swap(this) class='Menu' id='T1' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 50px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 1'>Menu 1</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S1' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 50px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 1-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 1-2</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 1-3' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 1-3</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 1-4' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 1-4</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 1-5' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 1-5</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S2);Swap(this) onMouseOut=Swap(this) class='Menu' id='T2' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 70px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 2'>Menu 2</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S2' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 70px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 2-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 2-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 2-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 2-2</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S3);Swap(this) onMouseOut=Swap(this) class='Menu' id='T3' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 90px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 3'>Menu 3</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S3' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 90px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 3-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 3-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 3-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 3-2</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 3-3' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 3-3</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 3-4' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 3-4</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S4);Swap(this) onMouseOut=Swap(this) class='Menu' id='T4' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 110px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 4' onClick=NavTo('/forum/index.html')>Menu 4</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S4' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 110px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 4-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 4-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 4-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 4-2</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S5);Swap(this) onMouseOut=Swap(this) class='Menu' id='T5' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 130px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 5' onClick=NavTo('/forum/index.html')>Menu 5</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S5' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 130px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 5-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 5-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 5-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 5-2</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 5-3' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 5-3</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 5-4' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 5-4</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S6);Swap(this) onMouseOut=Swap(this) class='Menu' id='T6' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 150px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 6' onClick=NavTo('/forum/index.html')>Menu 6</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S6' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 150px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 6-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 6-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 6-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 6-2</TD>
</TR>
<TR>
</TABLE>
<TABLE onMouseOver=SubMenu(S7);Swap(this) onMouseOut=Swap(this) class='Menu' id='T7' style='Z-INDEX: 1; LEFT: 10px; POSITION: absolute; TOP: 170px' cellSpacing='0' cellPadding='3' width='150'height='20' border='0'>
<TR>
<TD title='Menu 7' onClick=NavTo('/forum/index.html')>Menu 7</TD>
</TR>
</TABLE>
<TABLE class='SubMenu' id='S7' style='display: none; Z-INDEX: 2; LEFT: 161px; POSITION: absolute; TOP: 170px' cellSpacing='0' cellPadding='3'width='150' border='0'>
<TR>
<TD title='SubMenu 7-1' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 7-1</TD>
</TR>
<TR>
<TR>
<TD title='SubMenu 7-2' height='20'onMouseOver=Swap(this) onMouseOut=Swap(this) width='100%' onClick=NavTo('/forum/index.html')>SubMenu 7-2</TD>
</TR>
<TR>
</TABLE>
</span>
</P>
</form>
</body>
</HTML>
|
|
|
|
|
|
|
|