Hallo,
ich sitz jetzt seid einiger Zeit an meinem Menü, aber es funktioniert noch nicht. Findet jemand den Fehler?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script>
// Ebene unsichtbar machen
function hideLayer(layerName) {
//DOM
if(document.getElementById)
document.getElementById(layerName).style.visibility='hidden';
//IE
if(document.all)
document.all[layerName].style.visibility='hidden';
//Netscape4.x ohne Garantie
if(document.layers)
document.layers[layerName].style.visibility='hidden';
}
// Ebene sichtbar machen
function showLayer(layerName) {
//DOM
if(document.getElementById)
document.getElementById(layerName).style.visibility='visible';
//IE
if(document.all)
document.all[layerName].style.visibility='visible';
//Netscape4.x ohne Garantie
if(document.layers)
document.layers[layerName].style.visibility='visible';
}
</script>
<style>
#dynmenu {
position:absolute;
left:250px;
top:50px;
background-color:#c0c0c0;
width:250px;
visibility:hidden; }
a:link, a:active, a:hover, a:visited {
background-color:navy;
font-family:verdana,arial;
font-size:24px;
color:white; }
body {
font-family:verdana,arial;
font-size:24px;
color:#006666; }
p {
font-family:verdana,arial;
font-size:12px;
color:#000000; }
</style>
</head>
<body onClick="javascript:hideLayer('dynmenu')">
<center><a href="#" onClick="showLayer('dynmenu')">Link</a><br>
<p>Wenn hier Text steht,<br>
wird das Menü drüber gelegt.</p>
</center>
<div id="dynmenu">
Überschrift<br>
<a onClick="showLayer('dynmenu')" href="#">Menü 1</a><br>
<a onClick="showLayer('dynmenu')" href="#">Menü 2</a><br>
<a onClick="showLayer('dynmenu')" href="#">Menü 3</a>
</div>
</body>
</html>
Vielen Dank im Voraus.
Claudia