Antworten auf deine Fragen:
Neues Thema erstellen

Antworten zum Thema „Togglemenu“

hallo,

ich habe folgendes problem, und zwar will ich ein toggelmenu in meine site einbauen aber wenn ich ne zweite tabelle mache wird die immer angezeigt obwohl sie aus seinen soll, könntet ihr mir vielleicht da weiter helfen ob ich es vllt. falsch platziert habe.

Code:
<html>
<head>
<title></title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function togglemenu(menuid)
{
	// hide all menus
	document.getElementById('home').style.display = 'none';
	document.getElementById('clan').style.display = 'none';
	
	// display the chosen menu
	document.getElementById(menuid).style.display = '';
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('images/home_over.jpg','images/media_over.jpg','images/impressum_over.jpg')">
<center><table width="840" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
  <tr>
    <td width="840" height="19" valign="top"></td>
  </tr>
  <tr>
    <td width="840" height="24" valign="top" background="images/index_05.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
  <tr>
    <td width="29" height="24" valign="top">&</td>
    <td width="780" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="6" height="24">&</td>
        <td width="123" align="center">[url="#"][img]images/home.jpg[/img][/url]</td>
        <td width="6">&</td>
        <td width="123" align="center">[url="#"][img]images/clan.jpg[/img][/url]</td>
        <td width="6">&</td>
        <td width="123" align="center">[url="#"][img]images/community.jpg[/img][/url]</td>
        <td width="6">&</td>
        <td width="123" align="center">[url="#"][img]images/forum.jpg[/img][/url]</td>
        <td width="6">&</td>
        <td width="123" align="center">[url="#"][img]images/media.jpg[/img][/url]</td>
        <td width="6">&</td>
        <td width="123" align="center">[url="#"][img]images/impressum.jpg[/img][/url]</td>
        <td width="6">&</td>
      </tr>
    </table></td>
    <td width="31" valign="top">&</td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td background="images/index_06.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
<div id="home" style="">
  <tr>
    <td width="29" height="19" valign="top">&</td>
    <td width="785" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="88">&</td>
        <td width="13">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="11">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="79">&</td>
      </tr>
    </table></td>
    <td width="26" valign="top">&</td>
  </tr>
  </div>
  <div id="clan" style="display:none;">
  <tr>
    <td width="29" height="19" valign="top">&</td>
    <td width="785" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="88">&</td>
        <td width="13">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="89">&</td>
        <td width="11">&</td>
        <td width="89">&</td>
        <td width="12">&</td>
        <td width="79">&</td>
      </tr>
    </table></td>
    <td width="26" valign="top">&</td>
  </tr>
  </div>
</table>
</td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="230" height="138" valign="top" background="images/index_12.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="3" height="19" valign="top">&</td>
        <td width="221" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td width="221" height="19" valign="top">&</td>
          </tr>
        </table></td>
        <td width="3" valign="top">&</td>
      </tr>
    </table></td>
    <td width="74" height="139" background="images/index_08.jpg"></td>
    <td width="230" height="139" valign="top" background="images/index_09.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="3" height="19" valign="top">&</td>
        <td width="221" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td width="221" height="19" valign="top">&</td>
          </tr>
        </table></td>
        <td width="3" valign="top">&</td>
      </tr>
    </table></td>
    <td width="77" height="139" background="images/index_10.jpg"></td>
    <td width="229" height="139" valign="" background="images/index_11.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="3" height="19" valign="top">&</td>
        <td width="221" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td width="221" height="19" valign="top">&</td>
          </tr>
        </table></td>
        <td width="3" valign="top">&</td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td background="images/index_14.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
  <tr>
    <td width="840" height="19" valign="top">&</td>
  </tr>
</table>
</td>
  </tr>
    <tr>
    <td>[img]images/index_15.jpg[/img]</td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="175" valign="top" background="images/index_35.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td background="images/index_16.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="175" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="175" height="19" valign="top">&</td>
      </tr>
    </table></td>
    </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_21.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_16.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="175" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="175" height="19" valign="top">&</td>
      </tr>
    </table></td>
    </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_25.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_16.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="175" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="175" height="19" valign="top">&</td>
      </tr>
    </table></td>
    </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_29.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_16.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="175" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="175" height="19" valign="top">&</td>
      </tr>
    </table></td>
    </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_33.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_16.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="175" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="175" height="19" valign="top">&</td>
      </tr>
    </table></td>
    </tr>
</table>
</td>
      </tr>
    </table></td>
    <td width="458" valign="top" background="images/index_17.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="7" height="19" valign="top">&</td>
        <td width="444" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td width="444" height="19" valign="top">&</td>
          </tr>
        </table></td>
        <td width="7" valign="top">&</td>
      </tr>
    </table></td>
    <td width="207" valign="top" background="images/index_36.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td background="images/index_19.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="6" height="19" valign="top">&</td>
    <td width="195" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="195" height="19" valign="top">&</td>
      </tr>
    </table></td>
    <td width="6" valign="top">&</td>
  </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_22.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_19.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="6" height="19" valign="top">&</td>
    <td width="195" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="195" height="19" valign="top">&</td>
      </tr>
    </table></td>
    <td width="6" valign="top">&</td>
  </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_26.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_19.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="6" height="19" valign="top">&</td>
    <td width="195" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="195" height="19" valign="top">&</td>
      </tr>
    </table></td>
    <td width="6" valign="top">&</td>
  </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_30.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_19.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="6" height="19" valign="top">&</td>
    <td width="195" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="195" height="19" valign="top">&</td>
      </tr>
    </table></td>
    <td width="6" valign="top">&</td>
  </tr>
</table>
</td>
      </tr>
      <tr>
        <td>[img]images/index_34.jpg[/img]</td>
      </tr>
      <tr>
        <td background="images/index_19.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
  <tr>
    <td width="6" height="19" valign="top">&</td>
    <td width="195" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="195" height="19" valign="top">&</td>
      </tr>
    </table></td>
    <td width="6" valign="top">&</td>
  </tr>
</table>
</td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td>[img]images/index_39.jpg[/img]</td>
  </tr>
</table>
</td>
  </tr>
</table>
</center>
</body>
</html>


so sieht es dann immer aus
 

Rooky

Aktives Mitglied

Bohaaa was geht. Ich blick da echt net durch. Würd gern helfen. Welchen Teil des Scriptes meinst du genau?? Ich check das net ganz....

greez

PS: Auch wenns scho spät is. Morgen schau ich mir des auch noch mal an, aber durchblicken (-gruebel-) ...?
 

atkey

Noch nicht viel geschrieben

ich würde dir erst einmal raten deinen ganzen Code zu validieren... vielleicht löst sich dann dein Problem von selbst...

schon wenn ich das sehe, da weiß ich, dass da irgendwas schief läuft...
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">

      
<div id="home" style="">
  <tr>

diese home soll ja sicherlich versteckt werden ?
laut:
Code:
 document.getElementById('home').style.display = 'none';

müsstest also vielleicht die Tabelle mal in das div packen...aber keine garantie...
validiere lieber erst einmal


Validator gibts bei http://validator.w3.org/
oder als Extension für firefox... Dreamweaver macht eigentlich auch immer eine Fehlerüberprüfung....
 
hallo,

ihrgend wie will es net gehen entwerder verschwindet das ganze design, oder wird noch grösser, gibt es villeicht auch bei dreamweaver auch togglemenu (wenn ja wo bitte), weil ich hab es bis jetzt so rein kopiert vom script, was ich im internet gefunden habe.


viellendank für euere mühe
 

atkey

Noch nicht viel geschrieben

hast du mal meinen Rat befolgt und das Ganze validiert ?
Da sind nämlich einige Fehler drin....

oder mal den div layer über die tabelle geschoben?
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
175.187
Beiträge
2.582.068
Mitglieder
67.257
Neuestes Mitglied
Can Ergin
Oben