Hallo Forum
Ich versuche ein DropDown Menü als Verweisliste zu erstellen. Das ganze funktioniert auch schön. Das Problem ist folgendes:
Die ersten beiden Einträge der Liste enthalten keine Verweise, wenn man nun diese Einträge auswählt wird einfach eine leere Seite geladen, anstatt dass nichts passiert.
Das Beispiel in selfhtml, hat mir leider auch nicht auf die Sprünge geholfen.
Anbei das Script, sowie der relevante Teil des Formulares:
JS-Methode:
function load() {
var index = this.document.tform.bla.selectedIndex;
//alert(index);
if (index != 0 || index != 1) {
this.document.location = this.document.tform.bla.options[index].value;
this.document.tform.reset();
}
else{
this.document.tform.selectedIndex = 0;
}
}
Formular-Teil:
<form name="tform">
<select name="bla" onChange="load()">
<option selected>Projekt-Controlling</option>
<option>---------------</option>
<option value="/km/go/att?did=6114">dok1</option>
<option value="/km/go/att?did=6326">dok2</option>
<option value="/km/go/att?did=7489">dok3</option>
</select>
Besten Dank für Eure Hilfe und Gruss
gant