Dynamiske lag i NS4.......HJÆLP
Er der nogen der kan forælle mig hvorfor nedensående kode ikke virker i NS4 ??<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">
<title></title>
<style type=\"text/css\">
BODY
{
font-family: Tahoma;
color:#333300;
font-weight:normal;
text-decoration:none;
font-size:11px;
margin:0pt;border:0pt;
padding:0pt;
}
a:active
{
font-weight :bold;
color :white;
text-decoration :none;
font-size :11px;
}
#Menu0
{
position :absolute;
left :50;
top :100;
width :130px;
background-color :#006699;
text-aling :left;
visibility :hidden;
}
#Menu1
{
position :absolute;
left :250;
top :100;
width :130px;
background-color :#006699;
text-aling :left;
visibility :hidden;
}
#MenuLink
{
font-weight :bold;
color :white;
text-decoration :none;
font-size :11px;
}
</style>
<SCRIPT LANGUAGE=\"JavaScript\">
var arrMenu = [];
//arrPop[]
arrMenu[0]=[]
arrPop0=new Array()
arrPop0[0]=new Array(\'Test1\',\'http://www.eksperten.dk\',\'_top\')
arrPop0[1]=new Array(\'Test2\',\'http://www.eksperten.dk\',\'_top\')
//arrMenu[1]=[\'topmenu0\',\'http://www.maersk-logistics.com/sw74.asp\',\'_top\']
arrMenu[1]=[]
arrPop1=new Array()
arrPop1[0]=new Array(\'THX\',\'http://www.thx.com\',\'_top\')
arrPop1[1]=new Array(\'THX\',\'http://www.thx.com\',\'_top\')
arrPop1[2]=new Array(\'THX\',\'http://www.thx.com\',\'_top\')
var iMenuAmount = arrMenu.length;
function fncWriteMenuer()
{
for (z=0; z<iMenuAmount; z++)
{
zHtmlMenu = \'<div id=\\\"Menu\'+z+\'\\\"><table border=\\\"0\\\"><tr><td><table cellspacing=\\\"2\\\" cellpadding=\\\"2\\\" border=\\\"0\\\">\';
tmpArrPop=eval(\'arrPop\'+z);
tmpArrPopL=tmpArrPop.length;
for (x=0; x<tmpArrPopL; x++)
{
zHtmlMenu = zHtmlMenu + \'<tr><td valign=\\\"middle\\\"><a href=\\\"\'+tmpArrPop[x][1]+\'\" target=\\\"\'+tmpArrPop[x][2]+\'\" id=\\\"MenuLink\\\">\'+tmpArrPop[x][0]+\'</a></td></tr>\';
}
zHtmlMenu = zHtmlMenu + \'</table></td></tr></table></div>\';
document.write(zHtmlMenu);
}
return \"\";
}
document.write(fncWriteMenuer())
var menunavn = \"Menu\";
var menutimer = null;
function HideAll()
{
for(x=0;x<iMenuAmount;x++)
{
if(document.all)
{
eval(menunavn + x + \".style.visibility=\'hidden\'\");
}
else if(document.layers)
{
eval(\"document.layers.\" + menunavn + x + \".visibility = \'show\';\");
}
else if(document.getElementById)
{
document.getElementById(menunavn + x).style.visibility = \'hidden\';
}
else
{
alert(\"Videre til anden side\");
}
}
}
function show(item)
{
HideAll();
if(document.all)
{
eval(item+\".style.visibility=\'visible\'\");
}
else if(document.layers)
{
alert(item);
document.layers[item].visibility = \"show\";
}
else if(document.getElementById)
{
document.getElementById(item).style.visibility = \'visible\';
}
else
{
alert(\"Videre til anden side\")
}
}
</SCRIPT>
</head>
<body>
<a href=\"#\" onmouseover=\"java script:show(\'Menu0\')\">Menu0</a><BR>
<a href=\"#\" onmouseover=\"java script:show(\'Menu1\')\">Menu1</a><BR>
</body>
</html>
