Popup-Menus
Dave
- javascript
Hallo erstmal,
Für Eine Website, an der ich z. Zt. arbeite, würde ich gerne Popup-Menus verwenden (Jaja, ich weiss, dass man nicht alles auf Javascript setzen sollte), wie z.B. auf der Seite http://www.porsche.de/german/deu/home.htm. Ich habe das bereits einige Wochen lang versucht, jedoch wurden die Menus _NIEMALS_ korrekt vom Netscape 4.x angezeigt. Was kann ich jetzt noch tun??
Danke schonmal,
da Dave
Der Script funktioniert. (Nur für Netscape)
<HTML> <HEAD> <TITLE>test</TITLE> <!--LINK rel="styleSheet" href="mnunn.css"-->
<SCRIPT LANGUAGE="javaScript"> <!--
if (document.layers) { document.writeln('<LINK rel=stylesheet href=mnunn.css>'); document.writeln('<SCRIPT language=javaScript src=mnunn.js></script>');
} //--> </SCRIPT>
</HEAD> <BODY>
<LAYER position="absolute" bgColor="#FFDE7B" top="6" width="40" height="19" left="10"> <DIV class="menueN" style="LEFT: 10px; BORDER-LEFT: #000000 1px solid; TOP: 6px; HEIGHT: 19px"> </DIV> </LAYER> <LAYER position="absolute" bgColor="#FFDE7B" top="6" width="80" height="19" left="550" style="FONT-SIZE: 8pt"> <DIV class="menueN" style="BORDER-RIGHT: #000000 1px solid; FONT-SIZE: 8pt; LEFT: 550px; BORDER-BOTTOM: #000000 1px solid; TOP: 6px; HEIGHT: 19px; TEXT-ALIGN: right"> <FONT SIZE="-2" face="Arial">(c) by M. Kößling</FONT> </DIV> </LAYER> <!--Menüs --> <LAYER id="lmnue01" class="LmenueN" position="absolute" bgColor="#FFDE7B" top="6" width="130" height="19" left="50" onmouseover="hovern(this,'show',45)" onmouseout="hovern(this,'hide',0)"> <DIV class="menueN" id="mnue01" style="LEFT: 50px; TOP: 6px" onmouseover="hovern(this,'menueH')" onmouseout="hovern(this,'menueN')"> <li style="LIST-STYLE-TYPE: none"> <A style="COLOR: #000000; TEXT-DECORATION: none" href="kontakt.htm" >Kontakt </A></li> </DIV> </LAYER> <LAYER id="lmnue02" class="LmenueN" position="absolute" bgColor="#FFDE7B" top="6" width="130" height="19" left="180" onmouseover="hovern(this,'show',105)" onmouseout="hovern(this,'hide',0)"> <DIV class="menueN" id="mnue02" style="LEFT: 180px; TOP: 6px" onmouseover="hovern(this,'menueH')" onmouseout="hovern(this,'menueN')"> <li style="LIST-STYLE-TYPE: none"> <A style="COLOR: #000000; TEXT-DECORATION: none" href="tipps.htm">Tipps & Tricks </A></li> </DIV></LAYER> <LAYER id="lmnue03" class="LmenueN" position="absolute" bgColor="#FFDE7B" top="6" width="130" height="19" left="310" onmouseover="hovern(this,'show',75)" onmouseout="hovern(this,'hide',0)"> <DIV class="menueN" id="mnue03" style="LEFT: 310px; TOP: 6px" onmouseover="hovern(this,'menueH')" onmouseout="hovern(this,'menueN')"> <li style="LIST-STYLE-TYPE: none"> <A style="COLOR: #000000; TEXT-DECORATION: none" href="veroeff.htm">Veröffentlichungen </A></li> </DIV> </LAYER> <LAYER id="lmnue04" class="LmenueN" position="absolute" bgColor="#FFDE7B" top="6" width="130" height="19" left="440" onmouseover="hovern(this,'show',30)" onmouseout="hovern(this,'hide'),0"> <DIV class="menueN" id="mnue04" style="LEFT: 440px; TOP: 6px" onmouseover="hovern(this,'menueH')" onmouseout="hovern(this,'menueN')"> <li style="LIST-STYLE-TYPE: none"> <A style="COLOR: #000000; TEXT-DECORATION: none" href="ainfos.htm" >Autoren-Infos </A></li> </DIV> </LAYER><!--Menülisten --> <LAYER id="ulmnue01" class="LumenueN" width="129" top="25" background="linie.gif" bgcolor="#AFB1CD" color="#000000" visibility="hidden" clip="0,0,129,45" onmouseover="hovern_um(this,'show')" onmouseout="hovern_um(this,'hide')" left="50" z-index="4"> <DIV id="umnue01" class="umenueN" style="LEFT: 50px; TOP: 25px" onmouseover="hovern_um(this,'umenueH')" onmouseout="hovern_um(this,'umenueN')"> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="impressum.htm" > <li style="LIST-STYLE-TYPE: none">Impressum</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="adresse.htm" > <li style="LIST-STYLE-TYPE: none">Anschrift</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="uebermich.htm" > <li style="LIST-STYLE-TYPE: none">Lebenslauf</A> </LI> </DIV> </LAYER> <LAYER id="ulmnue02" class="LumenueN" width="129" top="25" background="linie.gif" bgcolor="#AFB1CD" color="#000000" visibility="hidden" clip="0,0,129,105" onmouseover="hovern_um(this,'show')" onmouseout="hovern_um(this,'hide')" left="180" z-index="4"> <DIV id="umnue02" class="umenueN" style="LEFT: 180px; TOP: 25px" onmouseover="hovern_um(this,'umenueH')" onmouseout="hovern_um(this,'umenueN')"> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#01" > <li style="LIST-STYLE-TYPE: none">Tipp der Woche!</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#excel" > <li style="LIST-STYLE-TYPE: none">zu Excel</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#word" > <li style="LIST-STYLE-TYPE: none">zu Word</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#outlook" > <li style="LIST-STYLE-TYPE: none">zu Outlook</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#outlook"> <li style="LIST-STYLE-TYPE: none"> zu Internet & HTML</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#vba" > <li style="LIST-STYLE-TYPE: none">zu VBA</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="tipps.htm#sonstiges"> <li style="LIST-STYLE-TYPE: none"> sonstige</A></LI> </DIV> </LAYER> <LAYER id="ulmnue03" class="LumenueN" width="129" top="25" background="linie.gif" bgcolor="#AFB1CD" color="#000000" visibility="hidden" clip="0,0,129,75" onmouseover="hovern_um(this,'show')" onmouseout="hovern_um(this,'hide')" left="310" z-index="4"> <DIV id="umnue03" class="umenueN" style="LEFT: 310px; TOP: 25px" onmouseover="hovern_um(this,'umenueH')" onmouseout="hovern_um(this,'umenueN')"> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="buecher.htm" > <li style="LIST-STYLE-TYPE: none">Bücher</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="fzeitschr.htm"> <li style="LIST-STYLE-TYPE: none">Fachzeitschriften</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="loseblatt.htm"> <li style="LIST-STYLE-TYPE: none">Loseblattsamml.</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="downloads.htm"> <li style="LIST-STYLE-TYPE: none">Downloads</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="erata.htm" > <LI style="LIST-STYLE-TYPE: none">Erata</A> </LI> </DIV> </LAYER> <LAYER id="ulmnue04" class="LumenueN" width="129" top="25" background="linie.gif" bgcolor="#AFB1CD" color="#000000" visibility="hidden" clip="0,0,129,30" onmouseover="hovern_um(this,'show')" onmouseout="hovern_um(this,'hide')" left="440" z-index="4"> <DIV id="umnue04" class="umenueN" style="LEFT: 440px; TOP: 25px" onmouseover="hovern_um(this,'umenueH')" onmouseout="hovern_um(this,'umenueN')"> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="ainfos.htm" > <li style="LIST-STYLE-TYPE: none"> Informationen</A> <A class=liste01 onmouseover="hovern2(this,'liste02')" style="COLOR: #000000; TEXT-DECORATION: none" onmouseout="hovern2(this,'liste01')" href="aforum.htm"> <li style="LIST-STYLE-TYPE: none">Forum</A> </LI></DIV></LAYER> <Layer name="inhalt" position="absolute" top="30" left"10" z-index="1"> <DIV id="inhalt" style="position:absolute;top:30;left:10;z-index:-1;"> DIV></LAYER> </BODY> </HTML>
mnunn.css .menueN {color:#000000; font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;font-weight:bold; z-index:5} .umenueN {font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;visibility:hidden;z-index:4} .LmenueN {color:#000000; font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;font-weight:bold; visibility:hidden;z-index:5} .LumenueN {font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;z-index:-1; visibility:hidden;z-index:4} .liste01 {LINE-HEIGHT: 1; font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;} li {font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;LIST-STYLE:none;} a:link {font-family:Arial,Futura,Tahoma,Verdana; text-decoration:none;color:#000000;} body {font-family:Arial,Futura,Tahoma,Verdana; font-size:9pt;}
mnunn.js function hovern2(elem,strFormat) { return; }
function hovern_um(elem,strFormat) { //alert(elem.name); //elem.visibility=strFormat; }
function hovern(elem,strFormat,lngUnten) { var elemName='u' + elem.name; var lngI; elem=document.layers[elemName]; elem.visibility=strFormat; if (strFormat=="show") { //aufklappen des Menüs elem.clip.bottom=0; for (lngI=0;lngI<=lngUnten;lngI++) { setTimeout("document.layers['"+elemName+ "'].clip.bottom=" + lngI,lngI+350); }
} }
Recht Herzlichen Dank für den Quelltext. Funktioniert wirklich.
Ich geb dir vielleicht mal den Link wenn die Seite fertig ist. Ach ja:
Soll dein Name nur im Quelltext in einem Kommentar oder im Menu auf der Website stehen?
Thx,
da Dave
Jetzt hab ich das Ding ausprobiert, und 2 kleine Fehler sind aufgetaucht (bei NS4.x)
-Die Menus gehen beim Darüberfahren wieder weg
-Javascript error on line 18: elem has no properties (... hat keine Eigenschaften)
Vielleicht weisst du ja nochwas?
Danke schonmal,
da Dave