Dani007: Menue: Warum funzen die Links im unten gezeigten menue nicht

<!doctype html public "-//w3c//dtd html 4.0//en">
<html>
<head>
<title>Menü</title>
<style type="text/css">
<!--
   a.farb:link    { color:#ffffff;
      font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; }
   a.class:visited { color:#000080;
      font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; }
   a.farb:hover   { color:#FFFFFF; background-color:#000080;
      font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; }
   a.farb:active  { color:#000080;
      font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; }
-->
  </style>

<script language="JavaScript">

var openmenu="menu1";
if(document.layers)
   {window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown=ausblenden;
   } else
   {document.onmousedown=ausblenden;
   }

function einblenden(param)
{   openmenu=param;
    if (document.layers)
    document.layers[openmenu].visibility ="show";
    else
    document.all[openmenu].style.visibility ="visible";
}

function ausblenden()
{   if (document.layers)
    document.layers[openmenu].visibility="hide";
    else
    document.all[openmenu].style.visibility="hidden";
}

</script>

<style type="text/css">
</style>

</head>
<body>
<div style="background-color:"withe"; font-color:"blue"; position: top:"100" left:"20" font-family:Arial; width:190 px">
   <a href="javascript:einblenden('menu1')">About Me!!</a><BR>
   <a href="javascript:einblenden('menu2')">Elektrotechnik</a><BR>
   <a href="javascript:einblenden('menu3')">Star Pics</a><BR>
   <a href="javascript:einblenden('menu4')">Stuff</a><BR>
</div>

<div id="menu1" class="link" style="background-color:rgb(51,102,153); position: absolute; visibility: hidden; left: 105px; top: 20px">
   <a class="farb" href="about.html">About ME </a> <br>
   <a class="farb" href="about/pics.html">Pics </a> <br>
</div>

<div id="menu2" class="link" style="background-color:rgb(51,102,153); position: absolute; visibility: hidden; left: 105px; top: 40px">
   <a class="farb" href="Seite2.htm">Formeln </a> <br>
   <a class="farb" href="Seite3.htm">Vorträge </a> <br>
   <a class="farb" href="school/abu.html">Zusammenfassungen ABU </a> <br>
   <a class="farb" href="school/vesa.html">Kurse VESA </a> <br>
</div>

<div id="menu3" class="link" style="background-color:rgb(51,102,153); position: absolute; visibility: hidden; left: 105px; top: 60px">
   <a class="farb" href="britney/britney.html">Britney Spears</a> <br>
   <a class="farb" href="cameron/cameron.html">Cameron Diaz</a> <br>
   <a class="farb" href="sandra/sandra.html">Sandra Bullock</a> <br>
</div>

<div id="menu4" class="link" style="background-color:rgb(51,102,153); width:93 px; position: absolute; visibility: hidden; left: 105px; top: 80px; right: 250px">
   <a class="farb" href="school/abu.html">Auto Tunning</a> <br>
   <a class="farb" href="Seite2.htm">Other Pics</a> <br>
   <a class="farb" href="links.html">Linkliste ABU</a> <br>
   <a class="farb" href="partner.html">Partnersites</a> <br>
</div>

<BR>
<a href="Seite1.htm">Gästebuch</a>
</body>
</html>

  1. hallo Dani,

    ist ja nett, daß du deine gesamte Seite hergeschrieben hast, aber ein bißchen Text in einem posting ist doch ganz sinnvoll. Deine links funktionieren nämlich durchaus  -  im Internet Edplorer. Du hättest also fragen sollen, warum das in mozilla/Netscape nicht funktioniert  -  aber das hättest du dich fragen sollen, _bevor_ du solche "Weichen" eingebaut hast:

    if (document.layers)
        document.layers[openmenu].visibility ="show";
        else
        document.all[openmenu].style.visibility ="visible";

    "layers" verstehen halt die aktuellen mozilla/Netscape-Browser nicht mehr. Du solltewst etwas anderes prüfen, wenn du nach Browsern sortieren möchtest, "getElementById" ist das, was heute in der Regel für solche Zwecke eingesetzt wird  -  je nachdem, was du eigentlich machen möchtest.

    Grüße aus Berlin

    Christoph S.