Christoph Weyer: Pull Down Menü im Explorer Stil

Hallo Leute!

Ich möchte auf meiner Website ein Pull Down Menü im Explorer Stil machen. Prob ist, dass das Script was ich habe nicht für Frames geeignet ist und ich auch kein JS kann.

Könnte mir jemand sagen, was ich ändern muss, damit das Script auch mit Frames funktioniert. Der Frame, wo die Links angezeigt werden sollen heißt texte.

Vielen Dank
 Christoph Weyer

Hier das Script:

<HTML>
<HEAD>
<STYLE TYPE='text/css'>
<!--
li.oItem { color:#0000CC; cursor:hand; font-family:Verdana; font-size:9pt; margin-left:-18px; font-weight:bold; line-height:12pt; list-style-image:url(x3.gif) } ;
li.oParent { color:#CC6600; cursor:hand; font-family:Verdana; font-size:9pt; font-weight:bold; margin-left:-18px;  line-height:12pt; list-style-image:url(x1.gif) } ;
li.oParopen { color:#CC6600; cursor:hand; font-family:Verdana; font-size:9pt; font-weight:bold; margin-left:-18px;  line-height:12pt; list-style-image:url(x2.gif) } ;
ul ul { display: none; } ;
// -->
</STYLE>

<SCRIPT LANGUAGE='Javascript'>
<!--
// Returns the closest parent tag with tagName containing
// the src tag. If no such tag is found - null is returned.
function checkParent( src, tagName ) {
  while ( src != null ) {
   if (src.tagName == tagName)
    return src;
   src = src.parentElement;
  }
  return null;
}

// Returns the first tag with tagName contained by
// the src tag. If no such tag is found - null is returned.
function checkContent( src, tagName ) {
  var pos = src.sourceIndex ;
  while ( src.contains( document.all[++pos] ) )
   if ( document.all[pos].tagName == tagName )
    return document.all[pos] ;
  return null ;
}

// Handle onClick event in the outline box
function outlineAction() {
  var src = event.srcElement ;
  var item = checkParent( src, "LI" ) ;
  if(src.className == "oParent") src.className = "oParopen";
  else if(src.className == "oParopen") src.className = "oParent";

if ( parent != null ) {
   var content = checkContent( item, "UL" ) ;

if ( content != null )
    if ( content.style.display == "" )
     content.style.display = "block" ;
    else
     content.style.display = "" ;
  }
  event.cancelBubble = true;
}

function chg(obj,mode) {
   event.cancelBubble = true;
      if(mode == 1)
       obj.style.color = "#FFFFFF";
      if(mode == 2)
       obj.style.color = "#FFCC33";
    }

function Go(to,mode)
{
if(mode==1)
  top.location.href=to;
  location.target=texte;
if(mode==2)
  self.location.href=to;
  location.target=texte;
}

// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR=#FFFFFF TEXT=#000000>

<center> <img src="bilder/image001.gif" width=209 height=60> </center><br><br>

<DIV  onClick="JavaScript:outlineAction();">

<UL>
     <LI class='oParent'>Über die LAN
      <UL>
      <LI class='oItem' onClick="Go('news.htm',2)">News</LI>
      <LI class='oItem' onClick="Go('http://www.crawler.de/',2)">Allgemein</LI>
      <LI class='oItem' onClick="Go('http://www.dino-online.de/',2)">Termin</LI>
      <LI class='oItem' onClick="Go('http://www.excite.de/',2)">Technik</LI>
      <LI class='oItem' onClick="Go('http://www.infoseek.com/',2)">Catering</LI>
      <LI class='oItem' onClick="Go('http://www.yahoo.de/',2)">Zeitplan</LI>
      <LI class='oItem' onClick="Go('http://www.yahoo.de/',2)">F.A.Q.</LI>
      <LI class='oItem' onClick="Go('http://www.yahoo.de/',2)">Location</LI>
      </UL>
     </LI>
  </UL>
  <UL>
     <LI class='oParent'>Anmeldung
      <UL>
     </LI>
     <LI class='oParent'>Teilnehmer
      <UL>
      <LI class='oItem' onClick="Go('http://www.teleinfo.de/abfragen/bin/neuabfrage.pl',2)">Online Anmelden</LI>
      <LI class='oItem' onClick="Go('http://www.branchenbuch.com/index.html',2)">Per Post Anmelden</LI>
      <LI class='oItem' onClick="Go('http://www.iicm.edu/ref.m10/',2)">Teilnehmerliste</LI>
     </UL>
     </LI>
     <LI class='oParent'>Server
      <UL>
      <LI class='oItem' onClick="Go('http://www.teleinfo.de/abfragen/bin/neuabfrage.pl',2)">Server anmelden</LI>
      <LI class='oItem' onClick="Go('http://www.iicm.edu/ref.m10/',2)">Serverliste</LI>
     </UL>
     </LI>
    </UL>
   </LI>
  </UL>

<UL>
     <LI class='oParent'>Kontakt
      <UL>
     </LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Organisatoren</LI>
     <LI class='oParent'>Foren
      <UL>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Allgemeines</LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Turniere</LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Support</LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Feedback</LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Server</LI>
      <LI class='oItem' onClick="Go('http://www.altavista.digital.com/',2)">Party Talk</LI>
    </UL>

</UL>
   </LI>
  </UL>

<ul><LI class='oParent'>Gästebuch </LI></ul>

</DIV>

<!-- *************** DHTML Outline (end) ***************** -->

</BODY>
</HTML>

  1. Hi,

    änder doch mal die Funktion go() so ab:

    function Go(to,mode)
    {
    if(mode==1)
      self.location.href=to;
    if(mode==2)
      parent.texte.location.href=to;
    }

    Wobei mir nicht ganz klar ist, für was die zwei modes da sind ...

    CU

    Ronny