Hejsa
Hvordan kan det være at denne menu:
http://www.solutions2all.dk/demo/menu1.htmkun virker i IE og ikke firefox?
Kan man ikke gøre sådan at den virker i begge browsere?
// Jakob
Kildekoden:
<html>
<head>
<title>menu</title>
<script language="JavaScript">
var menuopen = 0;
var mTimer = null;
var closemenu = true
var alphaInit = 85;
var alphaFade = 30;
var alphaTime = 50;
function setMenu() {
if (document.layers) {
var w = window.innerWidth;
if(w>800) w = (w-800)/2; else w = 0;
document.layers.menu1.top = 70;
document.layers.menu2.top = 70;
document.layers.menu3.top = 70;
document.layers.menu4.top = 70;
document.layers.menu5.top = 70;
document.layers.menu6.top = 70;
document.layers.menu1.left = 61+w;
document.layers.menu2.left = 121+w;
document.layers.menu3.left = 175+w;
document.layers.menu4.left = 217+w;
document.layers.menu5.left = 250+w;
document.layers.menu6.left = 358+w;
}
else if (document.all) {
var w = document.body.clientWidth;
if(w>780) w = (w-780)/2; else w = 0;
document.all.menu1.style.top = 60; // Her indstiller du hvor tæt du vil på din table
document.all.menu2.style.top = 60;
document.all.menu3.style.top = 60;
document.all.menu4.style.top = 60;
document.all.menu5.style.top = 60;
document.all.menu6.style.top = 60;
document.all.menu1.style.left = 195+w; // Her indstiller du DropDown menu fra fra side til side
document.all.menu2.style.left = 240+w;
document.all.menu3.style.left = 290+w;
document.all.menu4.style.left = 330+w;
document.all.menu5.style.left = 380+w;
document.all.menu6.style.left = 440+w;
}
setTimeout("setMenu()",45); // Man skal ikke røre ved noget i resten af scriptet
}
function mOverMenu(a,b) {
clearTimeout(mTimer);
if (document.layers)
//eval("document.menu" + a + "_" + b + ".bgColor='#FF6666';");
void(0)
else if (document.all)
eval("document.all.menu" + a + "_" + b + ".bgColor='#FF6666';");
mClose = false;
}
function mOutMenu(a,b) {
if (document.layers)
//eval("document.menu" + a + "_" + b + ".bgColor='';");
void(0)
else if (document.all)
eval("document.all.menu" + a + "_" + b + ".bgColor='';");
mTimer = setTimeout("CheckMenu(" + menuopen + ")",780)
mClose = true;
}
function CheckMenu(a) {
clearTimeout(mTimer);
if(mClose==true && a!=0) {
closeMenu(a);
}
}
function closeMenu(a) {
if (document.layers)
eval("document.layers.menu" + a + ".visibility='hide';");
else if (document.all)
setTimeout("fadeMenu(" + a + "," + alphaInit + ")",alphaTime);
//eval("document.all.menu" + a + ".style.visibility='hidden';");
menuopen = 0;
}
function fadeMenu(a,alpha) {
if(alpha<=0) {
eval("document.all.menu" + a + ".style.filter='alpha(opacity=0)';");
eval("document.all.menu" + a + ".style.visibility='hidden';");
} else {
eval("document.all.menu" + a + ".style.filter='alpha(opacity=" + alpha + ")';");
alpha -= alphaFade;
setTimeout("fadeMenu(" + a + "," + alpha + ")",alphaTime)
}
}
function openMenu(a) {
if(menuopen!=0 && menuopen!=a)
if (document.layers)
eval("document.layers.menu" + menuopen + ".visibility='hide';");
else if (document.all) {
setTimeout("fadeMenu(" + menuopen + "," + alphaInit + ")",alphaTime);
//eval("document.all.menu" + menuopen + ".style.visibility='hidden';");
}
if (document.layers)
eval("document.layers.menu" + a + ".visibility='show';");
else if (document.all) {
eval("document.all.menu" + a + ".style.filter='alpha(opacity=" + alphaInit + ")';");
eval("document.all.menu" + a + ".style.visibility='visible';");
}
menuopen = a;
}
</script>
</head>
<body onload="setMenu();" bgcolor="#FFFFFF" text="#FFFFFF" leftmargin="0" marginwidth="0" topmargin="35 " marginheight="4" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" background="grafik/yh15pat.gif">
<div id="menu1" style="visibility: hidden; position: absolute; top:0; z-index: 10;">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu">
<tr>
<td id="menu1_2"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,2);" onMouseOut="mOutMenu(1,2);"><font size="1" face="Verdana"> Link 2 </font></a></td>
</tr>
<tr>
<td id="menu1_3"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,3);" onMouseOut="mOutMenu(1,3);"><font size="1" face="Verdana"> Link 3 </font></a></td>
</tr>
<tr>
<td id="menu1_4"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,4);" onMouseOut="mOutMenu(1,4);"><font size="1" face="Verdana"> Link 4 </font></a></td>
</tr>
<tr>
<td id="menu1_5"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,5);" onMouseOut="mOutMenu(1,5);"><font size="1" face="Verdana"> Link 5 </font></a></td>
</tr>
<tr>
<td id="menu1_6"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,6);" onMouseOut="mOutMenu(1,6);"><font size="1" face="Verdana"> Link 6 </font></a></td>
</tr>
<tr>
<td id="menu1_7"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,7);" onMouseOut="mOutMenu(1,7);"><font size="1" face="Verdana"> Link 7 </font></a></td>
</tr>
<tr>
<td id="menu1_8"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,8);" onMouseOut="mOutMenu(1,8);"><font size="1" face="Verdana"> Link 8 </font></a></td>
</tr>
<tr>
<td id="menu1_9"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,9);" onMouseOut="mOutMenu(1,9);"><font size="1" face="Verdana"> Link 9 </font></a></td>
</tr> <tr>
<td id="menu1_10"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,10);" onMouseOut="mOutMenu(1,10);"><font size="1" face="Verdana"> Link 10 </font></a></td>
</tr> <tr>
<td id="menu1_11"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,11);" onMouseOut="mOutMenu(1,11);"><font size="1" face="Verdana"> Link 11 </font></a></td>
</tr><tr>
<td id="menu1_12"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,12);" onMouseOut="mOutMenu(1,12);"><font size="1" face="Verdana"> Link 12 </font></a></td>
</tr>
<tr>
<td id="menu1_13"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(1,13);" onMouseOut="mOutMenu(1,13);"><font size="1" face="Verdana"> Link 13 </font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="menu2" style="visibility: hidden; position: absolute; top: 0; z-index: 10; left: 0; ; height: 57">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu">
<tr>
<td id="menu2_2"><a class="topmenu2" href="Link.asp" onMouseOver="mOverMenu(2,2);" onMouseOut="mOutMenu(2,2);"><font size="1" face="Verdana"> Link 2 </font></a></td>
</tr>
<tr>
<td id="menu2_3"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(2,3);" onMouseOut="mOutMenu(2,3);"><font size="1" face="Verdana"> Link 3 </font></a></td>
</tr>
<tr>
<td id="menu2_4"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(2,4);" onMouseOut="mOutMenu(2,4);"><font size="1" face="Verdana"> Link 4 </font></a></td>
</tr>
<tr>
<td id="menu2_5"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(2,5);" onMouseOut="mOutMenu(2,5);"><font size="1" face="Verdana"> Link 5 </font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="menu3" style="visibility: hidden; position: absolute; top:0; z-index: 10;">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu">
<tr>
<td id="menu3_2"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,2);" onMouseOut="mOutMenu(3,2);"><font size="1" face="Verdana"> LINK 2 </font></a></td>
</tr>
<tr>
<td id="menu3_3"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,3);" onMouseOut="mOutMenu(3,3);"><font size="1" face="Verdana"> LINK 3 </font></a></td>
</tr>
<tr>
<td id="menu3_4"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,4);" onMouseOut="mOutMenu(3,4);"><font size="1" face="Verdana"> LINK 4 </font></a></td>
</tr>
<tr>
<td id="menu3_5"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,5);" onMouseOut="mOutMenu(3,5);"><font size="1" face="Verdana"> LINK 5 </font></a></td>
</tr>
<tr>
<td id="menu3_6"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,6);" onMouseOut="mOutMenu(3,6);"><font size="1" face="Verdana"> LINK 6 </font></a></td>
</tr>
<tr>
<td id="menu3_7"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,7);" onMouseOut="mOutMenu(3,7);"><font size="1" face="Verdana"> LINK 7 </font></a></td>
</tr> <tr>
<td id="menu3_8"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(3,8);" onMouseOut="mOutMenu(3,8);"><font size="1" face="Verdana"> LINK 8 </font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="menu4" style="visibility: hidden; position: absolute; top:0; z-index: 10;">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu">
<tr>
<td id="menu4_1"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(4,1);" onMouseOut="mOutMenu(4,1);"><font size="1" face="Verdana"> LINK 2 </font></a></td>
</tr>
<tr>
<td id="menu4_2"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(4,2);" onMouseOut="mOutMenu(4,2);"><font size="1" face="Verdana"> LINK 3 </font></a></td>
</tr>
<tr>
<td id="menu4_3"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(4,3);" onMouseOut="mOutMenu(4,3);"><font size="1" face="Verdana"> LINK 4 </font></a></td>
</tr>
<tr>
<td id="menu4_4"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(4,4);" onMouseOut="mOutMenu(4,4);"><font size="1" face="Verdana"> LINK 5 </font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="menu5" style="visibility: hidden; position: absolute; top:0; z-index: 10;">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu">
<tr>
<td id="menu5_2"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(5,2);" onMouseOut="mOutMenu(5,2);"><font size="1" face="Verdana">LINK 2 </font></a></td>
</tr>
<tr>
<td id="menu5_3"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(5,3);" onMouseOut="mOutMenu(5,3);"><font size="1" face="Verdana">LINK 3 </font></a></td> </tr>
<tr>
<td id="menu5_4"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(5,4);" onMouseOut="mOutMenu(5,4);"><font size="1" face="Verdana">LINK 4 </font></a></td> </tr>
</table>
</td>
</tr>
</table>
</div>
<div id="menu6" style="visibility: hidden; position: absolute; top:0; z-index: 10;">
<table bgcolor="#000000" cellpadding=0 cellspacing=1 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 class="menu" >
<tr>
<td id="menu6_2" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,2);" onMouseOut="mOutMenu(6,2);"><font size="1" face="Verdana"> LINK 2 </font></a></td>
</tr>
<tr>
<td id="menu6_3" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,3);" onMouseOut="mOutMenu(6,3);"><font size="1" face="Verdana"> LINK 3 </font></a></td>
</tr>
<tr>
<td id="menu6_4" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,4);" onMouseOut="mOutMenu(6,4);"><font size="1" face="Verdana"> LINK 4 </font></a></td>
</tr>
<tr>
<td id="menu6_5" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,5);" onMouseOut="mOutMenu(6,5);"><font size="1" face="Verdana"> LINK 5 </font></a></td>
</tr>
<tr>
<td id="menu6_6" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,6);" onMouseOut="mOutMenu(6,6);"><font size="1" face="Verdana"> LINK 6 </font></a></td>
</tr>
<tr>
<td id="menu6_7" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,7);" onMouseOut="mOutMenu(6,7);"><font size="1" face="Verdana"> LINK 7 </font></a></td>
</tr>
<tr>
<td id="menu6_8" height="16"><a class="topmenu2" href="link.asp" onMouseOver="mOverMenu(6,8);" onMouseOut="mOutMenu(6,8);"><font size="1" face="Verdana"> LINK 8 </font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<script language="JavaScript">setMenu();</script>
<div align="center">
<center>
<table width="690" border="0" cellspacing="0" cellpadding="0" bgcolor="#008080" style="border-collapse: collapse" bordercolor="#111111" height="7">
<tr height="18">
<td height="7" width="155"></td>
<td height="7" width="332" valign="middle">
<p align="left">
<font size="1" face="Tahoma" color="#FFFFFF"><b>
<a style="color: #FFFFFF" href="link.asp" id="menu1_0" onMouseOver="openMenu(1);mOverMenu(1,0);" onMouseOut="mOutMenu(1,0);" class="topmenu" style="color: #FFFFFF">LINK 1</a>
<a style="color: #FFFFFF" href="link.asp" id="menu2_0" onMouseOver="openMenu(2);mOverMenu(2,0);" onMouseOut="mOutMenu(2,0);" class="topmenu">LINK 2</a>
<a style="color: #FFFFFF" href="link.asp" id="menu3_0" onMouseOver="openMenu(3);mOverMenu(3,0);" onMouseOut="mOutMenu(3,0);" class="topmenu">LINK 3</a>
<a style="color: #FFFFFF" href="link.asp" id="menu4_0" onMouseOver="openMenu(4);mOverMenu(4,0);" onMouseOut="mOutMenu(4,0);" class="topmenu">LINK 4</a>
<a style="color: #FFFFFF" href="link.asp" id="menu5_0" onMouseOver="openMenu(5);mOverMenu(5,0);" onMouseOut="mOutMenu(5,0);" class="topmenu">LINK 5</a>
<a style="color: #FFFFFF" href="link.asp" id="menu6_0" onMouseOver="openMenu(6);mOverMenu(6,0);" onMouseOut="mOutMenu(6,0);" class="topmenu">LINK 6</a></p>
</td>
<td> </td>
</tr>
</table>
</center>
</div>
</form>
<br><br><br><br><br><br><br><br><br><br> <center>
<a href="http://www.solutions2all.dk/getclicks.asp?user=admin_proboss" target="_top">
<img src="http://www.solutions2all.dk/images/banners/solban7.gif" width="468" height="60" border="0" alt="Besøg Solutions2all.dk"></a>
</body>
</html>
Indlæg senest redigeret d. 02.04.2006 18:54 af Bruger #9706