Arne Kühn: Verweisliste als Auswahlliste mit JavaScript gem. SELFHTML-Quickbar

Hallo,

ich möchte so eine Quickbar bei mir integrieren, es soll jedoch sich der angeklickte Link nicht im unteren Frame öffnen, sondern das Frame aufgelöst werden und der link im kompletten aktuellen Anzeigefenster des Browsers dargestellt werden:

Hier die Version aus SELFHTML Seite ../tedi.htm#a1

Beispiel Teil 1 - Frame-Set-Datei:
<html>
<head>
<title>Seitentitel</title>
</head>
1* <frameset rows="40,*" border=0 frameborder=0 framespacing=0>
  <frame src="oben.htm" marginheight=3 marginwidth=10>
  <frame src="unten.htm">
</frameset>
</html>

Beispiel Teil 2 - Datei oben.htm:
<html>
<head>
<title>Seitentitel</title>
3* <script language="JavaScript">
  <!--
   function Go(x)
   {
    if(x == "nothing")
    {
      document.forms[0].reset();
      document.forms[0].elements[0].blur();
      return;
    }
    else if(x == "end") top.location.href = parent.frames[1].location;
    else
    {
      parent.frames[1].location.href = x;
      document.forms[0].reset();
      document.forms[0].elements[0].blur();
    }
  }
  //-->
</script>
</head>
<body>
2* <form>
<select size=1 name="Auswahl" onChange=
"Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)"
style="width:350px; background-color:#FFFFE0;
font-size:9pt; font-family:Arial,sans-serif;" width=350>
<option value="nothing">[ Titel ]
<option value="nothing">------------------------
<option value="unten.htm">Titel-Datei
<option value="nothing">------------------------
<option value="datei1.htm">Erste Datei
<option value="datei2.htm">Zweite Datei
<option value="datei3.htm">Dritte Datei
<option value="nothing">------------------------
<option value="end">Beenden
</select></form>
</body>
</html>

Was muß ich ändern, habe schon experimentiert, aber nicht viel erreicht.

CU Arne

  1. Hallo,
    mit "parent.frames[1].location.href = x;" in der Funktion "Go(x)" wird in diesem Fall  statt "unten.htm" dann  "x" in "frames[1]" geladen ("frames[0]" entspr. hier "oben.html"). Also müsste statt "parent.frames[1]" etwas wie "top" oder evtl. nur "parent" in der Funktion stehen.
    Grüsse,
    Kristof

  2. Hallo!

    ich habe das Script ein wenig abgeändert, so müßte es funktionieren.

    <script language="JavaScript">
      <!--
       function Go(x)
       {
        if(x == "nothing")
        {
          document.forms[0].reset();
          document.forms[0].elements[0].blur();
          return;
        }
        else if(x == "end") top.location.href = parent.frames[1].location;
        else
        {
          top.location.href = x;  //hier löst Du das Frameset auf und gewählte Seite wird angezeigt
        }
      }
      //-->
      </script>

    Anstaat parent.frames[1].location.href = x; wird top.location.href = x; geschrieben.
    dazu auch: <../../tecba.htm>

    mfg, André