dropdownmenu virker ikke !!
jeg har brug en kode til en dropdownmenu (anbefalet af callesen http://www.eksperten.dk/spm/161113) men jeg kan ikke få den til at virke, siden er simpelthen tom ! kan en rette koden eller give en ny som virker ??kode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Menu</title>
<link href="stylesheets/stylesheet.css" rel="stylesheet" type="text/css">
<meta name="generator" content="TSW WebCoder">
<!-- Minus AutoDato -->
<TITLE>[Ingen titel]</TITLE>
<META NAME=\"Generator\" CONTENT=\"Stone\'s WebWriter 3\">
<style type=\"text/css\">
<!-- a.x:link, a.x:visited, a.x:active{color:#ffffff;text-decoration:none} //-->
</style>
</head>
<body marginheight=\"50\" topmargin=\"50\">
<script language=\"JavaScript\">
<!-- Cross Browser NavBar2 (Not NS6)
if (document.layers||document.all){
MenuTitles=new Array()
SubMenuLinks=new Array()
function Rtrn(c){
if (document.layers) c.bgColor=HighLight;
if (document.all) c.style.background=HighLight;
}
function HghLght(c){
if (document.layers) c.bgColor=MenuBgColor;
if (document.all) c.style.background=MenuBgColor;
}
OpenLayer=(document.layers)?\"<br><layer width=100% onMouseOver=\'HghLght(this)\'; onMouseOut=\'Rtrn(this)\'><center>\":\"<span style=\'width:100%\' onMouseOver=\'HghLght(this)\'; onMouseOut=\'Rtrn(this)\'>\";
CloseLayer=(document.layers)?\'</center></layer>\':\'</span>\';
/*Her indstilles udseendet*/
MenuWidth=500;
MenuFont=\'Verdana,Arial\';
MenuFontSize=2; //kun mellem 1 to 7
SubMenuFontSize=1; //kun mellem 1 to 7
MenuFontColor=\'#000000\';
MenuBgColor=\'DDF9DB\';
HighLight=\'AEFCA6\';
Separater=2;
/*Menu antal - slet eller tilføj*/
MenuTitles[0]=\'Forside\';
MenuTitles[1]=\'Klubber\';
MenuTitles[2]=\'Biografer\';
MenuTitles[3]=\'Spil\';
MenuTitles[4]=\'Sport\';
/*Undermenuer. Ændr ikke: +OpenLayer+\" eller \"+CloseLayer
Sådan udfyldes links. Eksempel:
+OpenLayer+\"<a href=\'http://www.google.com\' class=\'x\'>Google</a>\"+CloseLayer
*/
SubMenuLinks[0]=\"\"
+OpenLayer+\"<a href=\'http://www.ungfritid.dk\' class=\'x\'>Ungfritid</a>\"+CloseLayer
SubMenuLinks[1]=\"\"
+OpenLayer+\"<a href=\'klub/njylland.shtml\' class=\'x\'>Nordjylland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/sjylland.shtml\' class=\'x\'>Sønderjylland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/fyn.shtml\' class=\'x\'>Fyn og øerne</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/sjlland.shtml\' class=\'x\'>Sjælland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/kbh.shtml\' class=\'x\'>København</a>\"+CloseLayer
SubMenuLinks[2]=\"\"
+OpenLayer+\"<a href=\'klub/njylland.shtml\' class=\'x\'>Nordjylland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/sjylland.shtml\' class=\'x\'>Sønderjylland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/fyn.shtml\' class=\'x\'>Fyn og øerne</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/sjlland.shtml\' class=\'x\'>Sjælland</a>\"+CloseLayer
+OpenLayer+\"<a href=\'klub/kbh.shtml\' class=\'x\'>København</a>\"+CloseLayer
SubMenuLinks[3]=\"\"
+OpenLayer+\"<a href=\'spil/nyeste.shtml\' class=\'x\'>De nyeste</a>\"+CloseLayer
+OpenLayer+\"<a href=\'spil/bedste.shtml\' class=\'x\'>De bedste</a>\"+CloseLayer
+OpenLayer+\"<a href=\'spil/klassiske.shtml\' class=\'x\'>De klassiske</a>\"+CloseLayer
+OpenLayer+\"<a href=\'spil/rolle.shtml\' class=\'x\'>Live Rollespil</a>\"+CloseLayer
SubMenuLinks[4]=\"\"
+OpenLayer+\"<a href=\'sport/fodbold.shtml\' class=\'x\'>Fodbold</a>\"+CloseLayer
+OpenLayer+\"<a href=\'sport/hndbold.shtml\' class=\'x\'>Håndbold</a>\"+CloseLayer
+OpenLayer+\"<a href=\'sport/liste.shtml\' class=\'x\'>Komplet liste</a>\"+CloseLayer
/*Dette bør ikke ændres:*/
MenuAmount=MenuTitles.length;
MenWidth=0;
PageWidth=0;
IniPos=0;
Spacer=0;
aIniPos=0;
aSpacer=0;
function Pos(){
MenWidth=(MenuWidth+Separater)*MenuAmount;
PageWidth=(document.layers)?window.innerWidth/2:document.body.clientWidth/2;
IniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
Spacer=MenuWidth+Separater;
aIniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
aSpacer=MenuWidth+Separater;
if (MenWidth > PageWidth*2){
IniPos=-MenuWidth-Separater;
aIniPos=-MenuWidth-Separater;
}
}
Pos();
if (document.layers){
for (i=0; i < MenuAmount; i++){
document.write(\"<layer name=\'submenu\"+i+\"\' top=0 left=\"+(aIniPos+=aSpacer)+\" \"
+\" width=\"+MenuWidth+\" bgcolor=\"+HighLight+\" visibility=hide\"
+\" onMouseOver=\'this.visibility=\\\"show\\\"; var cd=this.id.length-1; var ab=this.id.charAt(cd); H(ab)\' \"
+\" onMouseOut=\'this.visibility=\\\"hide\\\"; var ef=this.id.length-1; var gh=this.id.charAt(ef); B(gh)\'>\"
+\"<center><font face=\"+MenuFont+\" size=\"+SubMenuFontSize+\">\"
+\" <br>\"+SubMenuLinks[i]+\"<br></font></center></layer>\");
}
for (i=0; i < MenuAmount; i++){
document.write(\"<layer name=\'nsmenu\"+i+\"\' top=0 left=\"+(IniPos+=Spacer)+\" height=0 \"
+\"width=\"+MenuWidth+\" bgcolor=\"+MenuBgColor+\" \"
+\"onMouseOver=\\\"this.bgColor=HighLight; var e=this.id.length-1; var d=this.id.charAt(e); On(d)\\\" \"
+\"onMouseOut=\\\"this.bgColor=MenuBgColor; var e=this.id.length-1; var d=this.id.charAt(e); Off(d)\\\">\"
+\"<center><font face=\"+MenuFont+\" size=\"+MenuFontSize+\" color=\"+MenuFontColor+\">\"
+MenuTitles[i]+\"</font></center></layer>\");
}
function On(x){
for (i=0; i < MenuAmount; i++){
document.layers[\'submenu\'+x].visibility=\'show\';
}
}
function Off(x){
for (i=0; i < MenuAmount; i++){
document.layers[\'submenu\'+x].visibility=\'hide\';
}
}
function B(y){
for (i=0; i < MenuAmount; i++){
document.layers[\'nsmenu\'+y].bgColor=MenuBgColor;
}
}
function H(y){
for (i=0; i < MenuAmount; i++){
document.layers[\'nsmenu\'+y].bgColor=HighLight;
}
}
}
if (document.all){
for (i=0; i < MenuAmount; i++){
document.write(\"<div id=\'sub\"+i+\"\' style=\'position:absolute;\"
+\"top:100px;\"
+\"left:\"+(aIniPos+=aSpacer)+\";\"
+\"height:0px;\"
+\"width:\"+MenuWidth+\";\"
+\"background:\"+HighLight+\";\"
+\"visibility:hidden\'\"
+\" onMouseOver=\'this.style.visibility=\\\"visible\\\";\"
+\" document.all[\\\"headers\"+i+\"\\\"].style.background=HighLight\';\"
+\" onMouseOut=\'this.style.visibility=\\\"hidden\\\";\"
+\" document.all[\\\"headers\"+i+\"\\\"].style.background=MenuBgColor\'>\"
+\"<center><font face=\"+MenuFont+\" size=\"+SubMenuFontSize+\">\"
+\" <br> <br>\"+SubMenuLinks[i]+\"</font></center></div>\");
}
for (i=0; i < MenuAmount; i++){
document.write(\"<div id=\'headers\"+i+\"\' style=\'position:absolute;\"
+\"top:100px;\"
+\"left:\"+(IniPos+=Spacer)+\";\"
+\"height:0px;\"
+\"width:\"+MenuWidth+\";\"
+\"background:\"+MenuBgColor+\";\"
+\"cursor:default;\"
+\"padding:0px\'\"
+\" onMouseOver=\'document.all[\\\"sub\"+i+\"\\\"].style.visibility=\\\"visible\\\";\"
+\" this.style.background=HighLight\'\"
+\" onMouseOut=\'document.all[\\\"sub\"+i+\"\\\"].style.visibility=\\\"hidden\\\";\"
+\" this.style.background=MenuBgColor\'>\"
+\"<center><font face=\"+MenuFont+\" size=\"+MenuFontSize+\" color=\"+MenuFontColor+\">\"
+MenuTitles[i]+\"</font></center></div>\");
}
}
function Scroll(){
for (i=0; i < MenuAmount; i++){
if (document.layers){
document.layers[\'nsmenu\'+i].top=window.pageYOffset;
document.layers[\'submenu\'+i].top=window.pageYOffset;
}
/*Her indstilles afstand fra top og undermenuerne afstand hvis den skal være i top sæt 100 til 0*/
if (document.all){
document.all[\'headers\'+i].style.top=0+document.body.scrollTop;
document.all[\'sub\'+i].style.top=-13+document.body.scrollTop;
}
}
setTimeout(\'Scroll()\',150)
}
Scroll();
window.onresize=new Function(\"window.location.reload()\");
}
//-->
</script>
</BODY>
</html>