Zum Inhalt springen

Bitte um Hilfe bei Dropdown

Erstellt am 23. September 2006 · 2 Antworten · letzte Antwort am 23. September 2006

Tags: Frage

lorroloco ·

Hi erstmal!
Hab mit hilfe von Typo-Script ein Dropdownmenu auf meiner seite:

tmp.LOCATIONS = HMENU
tmp.LOCATIONS {
  special = directory
  special.value = 13
  wrap = <form name="quickmenu" action=""><select name="pfad"  onchange="window.location='index.php?id='+document.quickmenu.pfad.options[document.quickmenu.pfad.selectedIndex].value" class="dropdown"> |</select> </form>
  1 = TMENU
  1 {
    NO = 1
    NO.allWrap = <option value="{elementUid}"> | </option>
    NO.doNotLinkIt = 1


  }
}

funktioniert soweit ganz gut, nur wenn ich einen menüpunkt auswähle, wird zwar die jeweilige seite angezeigt, doch der ausgewählte menüpunkt bleibt nicht aktiv und es wird wieder der erste menüpunkt als makiert gesetzt.

Vielen Dank im Vorraus!

user667 ·

Hi,

gibt es nicht den Flag "selected"? Versuchs mal mit sowas:

      tmp.LOCATIONS = HMENU
      tmp.LOCATIONS {
        special = directory
        special.value = 13
        wrap = <form name="quickmenu" action=""><select name="pfad" onchange="window.location='index.php?id='+document.quickmenu.pfad.options[document.quickmenu.pfad.selectedIndex].value" class="dropdown"> |</select> </form>
        1 = TMENU
        1 {
          NO = 1
          NO.allWrap = <option value="{elementUid}"> | </option>
          NO.doNotLinkIt = 1
          #HIER:
          ACT = 1
          ACT.allWrap = <option value="{elementUid}" selected> | </option>
          ACT.doNotLinkIt = 1
        }
      }

Grüße