myGully.com

myGully.com (https://mygully.com/index.php)
-   Programmierung (https://mygully.com/forumdisplay.php?f=67)
-   -   Problem mit Javascript Menü (https://mygully.com/showthread.php?t=2106449)

tommy99 28.08.10 08:24

Problem mit Javascript Menü
 
Hey Leute ich habe volgenden Code benutz um ein Waagerechtes Javas***** Mwenü zum Aufklappen zu machenaber i-wie funktioniert die aufklap-Funktion nicht wieso?

Hier der Inhalt der ganzen HTML-Datei:
[HTML]<html >

<head>
<meta name="author" content="">
<meta name="des*****ion" content="">
<meta name="keywords" content="">
<meta http-equiv="content-language" content="de">
</head>

<body bgcolor ="#12345" background="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<s***** type="text/javas*****">
<!--
function montre(id) {
if (document.getElementById) {
document.getElementById(id).style.display="block";
} else if (document.all) {
document.all[id].style.display="block";
} else if (document.layers) {
document.layers[id].display="block";
} }

function cache(id) {
if (document.getElementById) {
document.getElementById(id).style.display="none";
} else if (document.all) {
document.all[id].style.display="none";
} else if (document.layers) {
document.layers[id].display="none";
} }

//-->
</s*****>
<style type="text/css">
<!--
body {margin: 10px; padding: 0; font: 14px Verdana, sans-serif;}

ul, li {
list-style-type: none;
margin: 0;
padding: 0;
}

div.menu {
position: absolute;
width: 600px;
top: 10px;
z-index: 3;
}
div.menu li {
float: left;
width: 120px;
}

div.menu a {
margin: 0 2px;
height: 20px;
display: block;
text-align: center;
font-weight: bold;
border: 1px solid gray;
text-decoration: none;
color: #000;
background: #fff;
}

div.menu a:hover {
background: #ccc;
border: 1px solid gray;
}

#smenu1, #smenu2, #smenu3, #smenu4 {
display: none;
float: left;
width: 120px;
font-size: 12px;
}
#smenu1 a, #smenu2 a, #smenu3 a, #smenu4 a {
font-weight: normal;
border-top: 0 none;
}
.site {
position: absolute;
z-index: 1;
top : 70px;
left : 10px;
color: #000;
background-color: #ddd;
padding: 5px;
border: 1px solid gray;
}

.mentions {
position: absolute;
top : 300px;
left : 10px;
color: #000;
background-color: #ddd;
}
a {text-decoration: none;
color: #222;
}

-->
</style></head>


<body>

<div class="menu">
<ul><li><a onmouseover="montre(´smenu1´);" onmouseout="cache(´smenu1´);" href="">Menu 1</a> <ul style="display: none;" id="smenu1" onmouseover="montre(´smenu1´);" onmouseout="cache(´smenu1´);">
<li><a href="">Subkategorie 1.1</a></li>
<li><a href="">Subkategorie 1.2</a></li>
<li><a href="">Subkategorie 1.3</a></li>
</ul></li>
<li><a onmouseover="montre(´smenu2´);" onmouseout="cache(´smenu2´);" href="">Menu 2</a><ul id="smenu2" onmouseover="montre(´smenu2´);" onmouseout="cache(´smenu2´);">
<li><a href="">Subkategorie 2.1</a></li>
<li><a href="">Subkategorie 2.2</a></li>
</ul></li>
<li><a onmouseover="montre(´smenu3´);" onmouseout="cache(´smenu3´);" href="">Menu 3</a><ul id="smenu3" onmouseover="montre(´smenu3´);" onmouseout="cache(´smenu3´);">
<li><a href="">Subkategorie 3.1</a></li>
<li><a href="">Subkategorie 3.2</a></li>
<li><a href="">Subkategorie 3.3</a></li>
<li><a href="">Subkategorie 3.4</a></li>
<li><a href="">Subkategorie 3.5</a></li>
</ul></li>
<li><a onmouseover="montre(´smenu4´);" onmouseout="cache(´smenu4´);" href="">Menu 4</a><ul id="smenu4" onmouseover="montre(´smenu4´);" onmouseout="cache(´smenu4´);">
<li><a href="">Subkategorie 4.1</a></li>
<li><a href="">Subkategorie 4.2</a></li>
<li><a href="">Subkategorie 4.3</a></li>
</ul></li>
</ul>
</div>
</body>

</html>[/HTML]

allcrack 28.08.10 10:31

Schaue hier :


tommy99 28.08.10 11:08

das ist aber php und köntreste das auch ohne die beschreibungen am,chen?

allcrack 28.08.10 11:15

Ich will dir kein code zu verfügung stellen ^^
das soll nur eine hilfestellung sein

tommy99 28.08.10 11:19

problem ist ejtzt das ich mich da kaum mti auskenne und deshalb hab ich gard keien ah
 
ich eknn mcih da nciht mit aus ich hab da keien ahnung was du mri da helfen willst

allcrack 28.08.10 11:37

aber lesen kannste oder ??

tommy99 28.08.10 11:50

ja
 
ja aber es hilft mir ncihts weil ich nciht weis wie man die sachen dan in men code deinbaut usw.

allcrack 28.08.10 11:56

Schaue hier [Link nur für registrierte und freigeschaltete Mitglieder sichtbar. Jetzt registrieren...]


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:57 Uhr.

Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.