Author Topic: dropdownbox ohne "go"  (Read 6625 times)

0 Members and 1 Guest are viewing this topic.

Offline 0711concept

  • Newbie
  • *
  • Posts: 22
    • View Profile
dropdownbox ohne "go"
« on: October 08, 2002, 05:33:45 PM »
ich möchte die dropdownbox kategorien ohne "go" button machen.
d.h. bei klick springt es automatisch zur gewünschten seite.

das javascript sieht so aus:

Code: [Select]
<SCRIPT language=javascript>

 function doSel(obj)
 {
     for (i = 1; i < obj.length; i++)
        if (obj[i].selected == true)
           eval(obj[i].value);
}
</SCRIPT>

</head>

<body>


<form name="jsMenu">
<select name="jsSelList" size="1" onchange="doSel(this)">
    <option selected value>bitte auswaehlen</option>
    <option value="location.href='test1.html'">auswahl 1</option>
    <option value="location.href='test2.html'">auswahl 2</option>

    </select>
    </form>


</body>


wie bringe ich es jetzt mit ins script?

gruß 0711concept

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
dropdownbox ohne "go"
« Reply #1 on: October 08, 2002, 05:59:30 PM »
Automatisch springen tut es jetzt auch schon. Wenn Du den Button weghaben willst, einfach aus dem Template entfernen (category_dropdown_form.html).

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline 0711concept

  • Newbie
  • *
  • Posts: 22
    • View Profile
dropdownbox ohne "go"
« Reply #2 on: October 08, 2002, 09:02:56 PM »
stimmt, stand etwas auf dem schlauch.

gruß 0711concept