ich versuche mich gerade an meiner ersten Seite und hab da am linke Rand ne Menüleiste. Wenn ich mit der Maus über einzelne Punkte der Leiste gehe sollen unter dem Punkt Unterpunkte stehen. Das funktioniert sicher mit mouseover. Hier mal ein kläglich gescheiterter Versuch:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>click</title>
</head>
<script type="text/javascript">
function showEvent(id) {
var d=document.getElementById("event"+id);
var i=document.getElementById("e"+id);
if (d.style.display == "") {
d.style.display = "none";
} else {
d.style.display = "";
}
if (i.isactive == false i.isactive == undefined) {
i.style.backgroundColor = "#000";
i.isactive = true;
} else {
i.style.backgroundColor = "#ffffff";
i.isactive = false;
}
}
function highlight(obj) {
if (obj.isactive != true) {
obj.style.backgroundColor = "yellow";
}
}
function delight(obj) {
if (obj.isactive != true) {
obj.style.backgroundColor = "#ffffff";
}
}
</script>
<body>
<table cellpadding="0" cellspacing="0" border="1" width="400">
<tr id="e20" onclick="showEvent('20')" onmouseover="highlight(this)" onmouseout="delight(this)">
<td>click</td>
</tr>
<tr>
<td><div id="event20" class="tr" style="display: none;"></div></td>
</tr>
<tr class="trnormal" id="e21" onclick="showEvent('21')"
onmouseover="<tr>
<td>click2<td>
</tr>"
onmouseout="delight(this)">
<td>click</td>
</tr>
<tr>
<td><div id="event21" class="tr" style="display: none;"></div><td>
</tr>
</table>
</html>
Ich hab da schon einen ähnlichen Code gefunden, so in der Art werde ich den auch versuchen zu verwenden. Ich hoffe das das Prinzip das dahinter steht durchkommt. Wäre über Hilfe sehr erfreut.
MfG
Stefan