Problem mit einem Mousover Menü
lima-city → Forum → Die eigene Homepage → HTML, CSS & Javascript
-
So ich habe ein Javscript f?r ein Mous Over men?
nur es gibt einen kleinen fehler
ich habe die beiden obergeordneten Seiten B?hse Onkelz und Community
dann imme retwas untergeordnet nur bei Community kommt immer dasselbe wie bei B?hse Onkelz obwohl ich das anders eingestellt habe
K?nntet mir ja mal vielleicht meinen Fehler sagen wenn ihr ihn findet:
Ich w?re euch sehr dankbar es folgt der Quelltext:
<HTML>
<HEAD>
<TITLE>Meine Homepage</TITLE>
<META NAME="Author" CONTENT="Stephan-Weidner">
</HEAD>
<BODY BGCOLOR=#A1A1A1 TEXT=#FFFAFA LINK=#0000FF ALINK=#FF0000 VLINK=#000080>
<P ALIGN=CENTER></P>
<html>
<head>
<script language="JavaScript">
<!--
var breite;
var aktiv;
var pwidth;
var weiter;
var menueaktiv;
var number_layers = 1;
function hidealllayer(){
for(i = 1; i <= number_layers; i++)
document.getElementById("menue"+i).style.visibility="hidden";
}
function show_layer(x, time) {
hidealllayer();
weiter=x;
delay = time;
menueaktiv=window.setTimeout("show_layer_start()",delay);
}
function show_layer_start() {
if(document.getElementById) {
hidealllayer();
off_left=document.getElementById("pos"+weiter).offsetLeft;
parenttag=document.getElementById("pos"+weiter).offsetParent;
pwidth=document.getElementById("width"+weiter).width * 1.02;
do
{
off_left=off_left+parenttag.offsetLeft;
parenttag=parenttag.offsetParent;
}
while(parenttag.tagName != 'BODY');
if(weiter=="menue1")
{
breite = off_left+5;
}
else
{
breite = off_left;
}
if(pwidth <= 60)
{
pwidth = 80;
}
document.getElementById(weiter).style.left=breite+"px";
document.getElementById(weiter).style.visibility="visible";
document.getElementById(weiter).style.width=pwidth+"px";
}
}
function menuOut(s)
{
if(s==0){
aktiv=window.setTimeout("hidealllayer()",500);
}
if(s==1){
window.clearTimeout(aktiv);
}
if(s==2){
window.clearTimeout(menueaktiv);
}
}
//-->
</script>
</head>
<body>
<table>
<tr>
<td width="150px" id="widthmenue1">
<a id="close_link">
<span id="posmenue1" name="posmenue1" onMouseOver="show_layer('menue1', 350); menuOut(1)" onMouseOut="menuOut(2)" onClick="menuOut(2); menuOut(1); show_layer('menue1', 1)" >
B?hse Onkelz
</span>
</a>
</td>
</tr>
</table>
<div name="menue1" id="menue1" style="width:95px; height:10px; position:absolute; left:124px; top:135px; z-index:1; visibility:hidden;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td onmouseover="menuOut(1)" onmouseout="menuOut(0)">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="center" id="top_open_menue" style="border-top-width: 1px;border-top-style: solid;border-top-color: black;">
<a href="#">?Biographie</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Kindheit</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Sind die Onkelz rechts</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Songtexte</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Interwies</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Konzertberichte</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Bilder</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?H?rproben</a>
</td>
</tr>
<tr>
<td align="right">
<a href="#" onClick="hidealllayer()" id="close_link" ><span style="font-size:7pt;">Close X</span></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<table>
<div>
<tr>
<td width="150px" id="widthmenue1">
<a id="close_link">
<span id="posmenue1" name="posmenue1" onMouseOver="show_layer('menue1', 350); menuOut(1)" onMouseOut="menuOut(2)" onClick="menuOut(2); menuOut(1); show_layer('menue1', 1)" >
Community
</span>
</a>
</td>
</tr>
</table>
<div name="menue1" id="menue1" style="width:56px; height:60px; position:absolute; left:12px; top:13px; z-index:1; visibility:hidden;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td onmouseover="menuOut(1)" onmouseout="menuOut(0)">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="center" id="top_open_menue" style="border-top-width: 1px;border-top-style: solid;border-top-color: black;">
<a href="#">?G?stebuch</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Forum</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Chat</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Mitglieder</a>
</td>
</tr>
<tr>
<td height="20" align="center" id="top_open_menue">
<a href="#">?Witz der Woche</a>
</td>
</tr>
<tr>
<td align="right">
<a href="#" onClick="hidealllayer()" id="close_link" ><span style="font-size:7pt;">Close X</span></a>
</td>
</tr>
</table>
</div>
</body>
</html>
-
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage