Thomas: Menübox

Beitrag lesen

So ich hab es gefunden:
<html>
<head>
<title>Test</title>
<script type="text/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 bgcolor="#EEEEEE">
<form action=""><select size=1 name="Auswahl"
  onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)"
  style="width:250px; background-color:#FFFFE0; font-size:9pt; font-family:Arial,sans-serif;"
  width="250">
<option value="nothing">[ bitte auswählen! ]</option>
<option value="nothing">------------------------</option>
<option value="../verweisliste.htm">Verweisliste als Auswahlliste</option>
<option value="nothing">------------------------</option>
<option value="../../../editorial/index.htm">Editorial</option>
<option value="../../../intro/index.htm">Einführung</option>
<option value="../../../html/index.htm">HTML</option>
<option value="../../../css/index.htm">CSS Style-Sheets</option>
<option value="../../../xml/index.htm">XML/DTDs</option>
<option value="../../../javascript/index.htm">JavaScript/DOM</option>
<option value="../../../dhtml/index.htm">Dynamisches HTML</option>
<option value="../../../cgiperl/index.htm">CGI/Perl</option>
<option value="nothing">------------------------</option>
<option value="end">Beenden
</select></form>
</body>
</html>

also trotzdem danke
Thomas

deine code unten klappt nicht. das window muss bestimmt bleiben, weil es da in der gleichen frame geöffnet wird.
es muss einen anderen befehl geben um es nicht in der gleichen frame zu öffnen.
danke

<select onchange="if (this.options[this.selectedIndex].value){window.location.href(this.options[this.selectedIndex].value);}">
<option selected>Menüname</option>
<option value="seite1.html">link1</option>
<option value="seite2.html">link2</option>
</select>

so:

<select onchange="if (this.options[this.selectedIndex].value){Framename.location.href(this.options[this.selectedIndex].value);}">
<option selected>Menüname</option>
<option value="seite1.html">link1</option>
<option value="seite2.html">link2</option>
</select>

Statt Framename muss du halt noch deinen framenamen eintragen