Was muss in dem Script entfernt bzw. hinzugefügt werden?

  • Habe ein Problem mit meinem Navigationsmenue. Der Menuepunkt "Über uns" soll eigentlich keine Kategorien haben. Auf klick soll direkt das Themenmenue aufklappen ohne vorher eine Kategorie wählen zu müssen. Das Ding mit den Kategorien ist nur für "Training & Ausbildung" vorgesehen. Weiß leider nicht was im Script entfernt bzw. hinzugefügt werden muss. Kann mir jemand helfen?


    Hier der Code:


    <html>
    <head>
    <title>Klick Men&uuml;</title>

    <link href="layout.css" rel="stylesheet" type="text/css">

    <script type="text/javascript">
    <!--
    function open_close_sub (id)
    {
    if (document.getElementById(id).style.display == 'block')
    {
    document.getElementById(id).style.display='none';
    }
    else
    {
    document.getElementById('sub_master1').style.display='none';
    document.getElementById('sub_master2').style.display='none';

    document.getElementById(id).style.display='block';
    }
    }
    function open_close_thema (id, parent)
    {
    var sub_master1 = new Array ('sub1_thema1','sub1_thema2','sub1_thema3');
    var sub_master2 = new Array ('sub2_thema1','sub2_thema2');

    if (document.getElementById(id).style.display == 'block')
    {
    document.getElementById(id).style.display='none';
    }
    else
    {
    if (parent == 'sub_master1')
    {
    for (j=0; j<sub_master1.length; j++)
    {
    document.getElementById(sub_master1[j]).style.display='none';
    }

    document.getElementById(id).style.display='block';
    }
    if (parent == 'sub_master2')
    {
    for (j=0; j<sub_master2.length; j++)
    {
    document.getElementById(sub_master2[j]).style.display='none';
    }

    document.getElementById(id).style.display='block';
    }
    }
    }
    //-->
    </script>

    </head>
    <body>

    <div id='master1' onClick="open_close_sub(sub_master1)"> &Uuml;ber uns</div>
    <div id='sub_master1' style='display:none;'>

    <div id='sub1_master1' class='sub' onClick="open_close_thema(sub1_thema1, sub_master1)">Unser Rollenverst&auml;ndnis</div>
    <div id='sub1_thema1' name='thema_sub1' style='display:none;'>

    <div class='thema'>Thema 1</div>
    <div class='thema'>Thema 2</div>
    </div>

    <div id='sub2_master1' class='sub' onClick="open_close_thema(sub1_thema2, sub_master1)">Unsere Kompetenzen & Erfahrungen</div>
    <div id='sub1_thema2' style='display:none;'>

    <div class='thema'>Thema 1</div>
    <div class='thema'>Thema 2</div>
    </div>

    <div id='sub3_master1' class='sub' onClick="open_close_thema(sub1_thema3, sub_master1)">Unsere Dienstleistungen</div>
    <div id='sub1_thema3' style='display:none;'>

    <div class='thema'>Thema 1</div>
    <div class='thema'>Thema 2</div>
    </div>

    </div>


    <div id='master2' onClick="open_close_sub(sub_master2)">Training & Ausbildung</div>
    <div id='sub_master2' style='display:none;'>

    <div id='sub1_master2' class='sub' onClick="open_close_thema(sub2_thema1, sub_master2)">Gespr&auml;chsf&uuml;hrung&
    Verhandeln</div>
    <div id='sub2_thema1' name='thema_sub2' style='display:none;'>

    <div class='thema'>Gespr&auml;chsf&uuml;hrung Classics</div>
    <div class='thema'>Haltung zeigen – Stellung beziehen – Positionen
    kl&auml;ren</div>
    <div class='thema'>Argumentieren & Verhandeln</div>
    <div class='thema'>Projektmanager, Anw&auml;lte, Betriebsr&auml;te; F&uuml;hrungskr&auml;fte</div>
    <div class='thema'>Rhetorik</div>
    <div class='thema'>Rhetorische Dialektik</div>
    <div class='thema'>Verbale Schlagfertigkeit und Umgang mit Kampfrhetorik</div>
    <div class='thema'>Gespr&auml;che, Diskussionen und Meetings leiten</div>
    </div>

    <div id='sub2_master2' class='sub' onClick="open_close_thema(sub2_thema2, sub_master2)">Arbeitsmethoden
    und -techniken</div>
    <div id='sub2_thema2' style='display:none;'>

    <div class='thema'>Moderations-Methode</div>
    <div class='thema'>Die besten Meetings-Methoden</div>
    <div class='thema'>Techniken des Projektmanagement</div>
    <div class='thema'>Priorit&auml;tenmanagement</div>
    <div class='thema'>Mindmapping</div>
    <div class='thema'>Kreativit&auml;tstechniken</div>
    <div class='thema'>Selbst- und Zeitmanagement</div>
    </div>

    </body>
    </html>


    Und hier die CSS-Datei


    div {
    width: 200px;
    cursor: default;
    left: 210px;
    top: 140px;
    z-index: 2;
    }

    #master1 {
    position: relative;
    margin: 10px 0px 0px 10px;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: Black;
    text-align: right;
    padding-right: 20px;
    padding-bottom: 3px;
    }
    #master2 {
    position: relative;
    margin: 0px 0px 0px 10px;
    border-bottom-width: 1px;
    border-bottom-color: Black;
    border-bottom-style: solid;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: Black;
    text-align: right;
    padding-right: 20px;
    border-top-color: Black;
    border-top-style: solid;
    border-top-width: 1px;
    padding-top: 3px;
    padding-bottom: 3px;
    }
    .sub {
    position: relative;
    margin: 0px 0px 0px 10px;
    background-color: Fuchsia;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: Black;
    text-align: right;
    padding-right: 20px;
    padding-top: 3px;
    padding-bottom: 3px;
    }
    .thema {
    position: relative;
    margin: 0px 0px 0px 10px;
    background-color: #E7F3E3;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: Teal;
    text-align: right;
    padding-right: 20px;
    padding-bottom: 4px;
    padding-top: 3px;
    }


    Danke

  • Bei mir tut sich bei deinem Script überhaupt nichts! Hast du nicht ne Seite online bei ders funktioniert und wir es uns ansehen können?