• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Drop-Down-Menu

J

Julian

Guest
Hi,

ich wüsste gerne um welchen Befehl an welcher Stelle ich die beiden unten angeführten Scripts erweitern muss, so dass wenn man etwas auswählt, die Seite in einem bestimmten Frame geöffnet wird.

Danke an alle schon mal im Vorraus.
Julian

Script Nr.1
--------------
<script language="JavaScript">
<!-- Verstecken für ältere Browser --
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value !="0") {
location=form.select1.options[myindex].value;}
}
// Ende Verstecken -->
</SCRIPT>
<FORM NAME="form1">
<SELECT NAME="select1" onChange="surfto(this.form)" SIZE=1>
<OPTION SELECTED VALUE="0">-- Wählen Sie aus: --
<OPTION VALUE="apol1.html">Apollo 1
<OPTION VALUE="apol2.html">Apollo 2
<OPTION VALUE="apol3.html">Apollo 3
<OPTION VALUE="apol4.html">Apollo 4
<Option Value="apol5.html">Apollo 5
<option Value="apol6.html">Apollo 6
<option value="apol7.html">Apollo 7
<option value="apol8.html">Apollo 8
<option value="apol9.html">Apollo 9
<option value="apol10.html">Apollo 10
<option value="apol11.html">Apollo 11
<option value="apol12.html">Apollo 12
<option value="apol13.html">Apollo 13
<option value="apol14.html">Apollo 14
<option value="apol15.html">Apollo 15
<option value="apol16.html">Apollo 16
<option value="apol17.html">Apollo 17
</SELECT>
</FORM>

Script Nr.2
--------------
<form name="doublecombo">
<p><select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option>Apollo 1</option>
<option>Apollo 7</option>
<option>Apollo 8</option>
<option>Apollo 9</option>
<option>Apollo 10</option>
<option>Apollo 11</option>
<option>Apollo 12</option>
<option>Apollo 13</option>
<option>Apollo 14</option>
<option>Apollo 15</option>
<option>Apollo 16</option>
<option>Apollo 17</option>
</select>
<p>
<select name="stage2" size="1">
<option value="grissom.html">Grissom</option>
<option value="chaffee.html">Chaffee</option>
<option value="white.html">White</option>
</select>
<input type="button" name="test" value="Los!" onClick="go()"></p>
<script>
<!--
//Dieses Skript stammt von Michael Mailer´s JavaScripts
//URL: http://www.webaid.de/js -- eMail: mm@webaid.de
//Bitte entfernen Sie diesen Vermerk nicht !
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group=new Array()

group[0][0]=new Option("Grissom","grissom.html")
group[0][1]=new Option("Chaffee","chaffee.html")
//group[0][2]=new Option("White","white.html")

group[1][0]=new Option("Schirra","schirra.html")
group[1][1]=new Option("Eisele","eisele.html")
group[1][2]=new Option("Cunningham","cunning.html")

group[2][0]=new Option("Bormann","bormann.html")
group[2][1]=new Option("Lovell","lovell.html")
group[2][2]=new Option("Anders","anders.html")

group[3][0]=new Option("Divitt","divitt.html")
group[3][1]=new Option("Schweickhart","schwei.html")
group[3][2]=new Option("Scott","scott.html")

group[4][0]=new Option("Stafford","stafford.html")
group[4][1]=new Option("Cernan","cernan.html")
group[4][2]=new Option("Young","young.html")

group[5][0]=new Option("Armstrong","armst.html")
group[5][1]=new Option("Collins","collins.html")
group[5][2]=new Option("Aldrin","aldrin.html")

group[6][0]=new Option("Conrad","conrad.html")
group[6][1]=new Option("Gordon","gordon.html")
group[6][2]=new Option("Bean","bean.html")

group[7][0]=new Option("Lovell","lovell.html")
group[7][1]=new Option("Swigert","swigert.html")
group[7][2]=new Option("Haise","haise.html")

group[8][0]=new Option("Shepard","shepard.html")
group[8][1]=new Option("Roosa","roosa.html")
group[8][2]=new Option("Mitchell","mitch.html")

group[9][0]=new Option("Wordon","wordon.html")
group[9][1]=new Option("Scott","scott.html")
group[9][2]=new Option("Irwin","irwin.html")

group[10][0]=new Option("Young","young.html")
group[10][1]=new Option("Duke","duke.html")
group[10][2]=new Option("Mattingly","matting.html")

group[11][0]=new Option("Cernan","cernan.html")
group[11][1]=new Option("Schmitt","schmitt.html")
group[11][2]=new Option("Ewans","ewans.html")

var temp=document.doublecombo.stage2

function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options=new Option(group[x].text,group[x].value)
}
temp.options[0].selected=true
}

function go(){
location=temp.options[temp.selectedIndex].value
}

//-->
</script>Script Nr.1
 
1. Script:

if (form.select1.options[myindex].value !="0") {
parent.frames[1].location.href=form.select1.options[myindex].value;}

2.Script:

function go(){
parent.frames[1].location.href=temp.options[temp.selectedIndex].value;}

den Wert in der eckigen Klammer mußt Du entsprechend Deiner Frame anpassen.

Cya Steffen
 
Zurück
Oben