Fuchsik: Dropdown Menü 4fach !

Beitrag lesen

Hallo Leutz, hab da kleines Problemchen , bestimmt garnicht so schwehr naja ;-), also unten ist der Qell text .
kurze Beschreibung was ich da möchte. also hab ein 3faches Dropdown Menü genommen und möchte es 4fach machen aber es klappt nicht so richtig , natürlich hab ich auch kein Plan von Java :-( naja für meine Verhältnisse bin ich aber trotzdem weit .Und im Letzen Menü auswahl punkt soll mann auch einen Link einfügen können bzw. einem Link folgen . Hoffe das reicht .

code:
<html>

<head>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">

var arrItems1 = new Array();
var arrItemsGrp1 = new Array();

arrItems1[3] = "Alben";
arrItemsGrp1[3] = 1;
arrItems1[4] = "Sampler"
arrItemsGrp1[4] = 1;
arrItems1[5] = "Sonstige";
arrItemsGrp1[5] = 1;

arrItems1[6] = "PC";
arrItemsGrp1[6] = 2;
arrItems1[7] = "Playstation 2";
arrItemsGrp1[7] = 2;
arrItems1[8] = "Sega Mega Drive";
arrItemsGrp1[8] = 2;

arrItems1[0] = "Russisch";
arrItemsGrp1[0] = 3;
arrItems1[1] = "Englisch";
arrItemsGrp1[1] = 3;
arrItems1[2] = "Sonstige";
arrItemsGrp1[2] = 3;

var arrItems2 = new Array();
var arrItemsGrp2 = new Array();

arrItems2[9] = " Russischer Film ";
arrItemsGrp2[9] = 0
arrItems2[10] = " Russischer Film 2";
arrItemsGrp2[10] = 0

arrItems2[11] = "Englischer Film";
arrItemsGrp2[11] = 1
arrItems2[12] = "Englischer Film 2";
arrItemsGrp2[12] = 1

arrItems2[35] = "Sonstige Filme";
arrItemsGrp2[35] = 2
arrItems2[36] = "Sonstige Filme 2";
arrItemsGrp2[36] = 2

arrItems2[99] = "Sonstiges Sampler";
arrItemsGrp2[99] = 5
arrItems2[100] = "Sonstiger Mix";
arrItemsGrp2[100] = 5
arrItems2[57] = "Sonstiges Album";
arrItemsGrp2[57] = 5

arrItems2[111] = "Deutsch"  ;
arrItemsGrp2[111] = 3
arrItems2[112] = "Deutsch";
arrItemsGrp2[112] = 3
arrItems2[113] = "Englisch";
arrItemsGrp2[113] = 3
arrItems2[115] = "Russisch";
arrItemsGrp2[115] = 3

arrItems2[103] = "Deutsch";
arrItemsGrp2[103] = 4
arrItems2[104] = "Englisch";
arrItemsGrp2[104] = 4
arrItems2[111] = "Russisch";
arrItemsGrp2[111] = 4

arrItems2[106] = "Battlefield 1942 ";
arrItemsGrp2[106] = 6
arrItems2[107] = "Shellshock nam'67 ";
arrItemsGrp2[107] = 6

arrItems2[200] = "Asterix XXL";
arrItemsGrp2[200] = 7
arrItems2[201] = "Pro Evolution Soccer 3";
arrItemsGrp2[201] = 7
arrItems2[203] = "Athens 2004";
arrItemsGrp2[203] = 7

arrItems2[333] = "FIFA 95";
arrItemsGrp2[333] = 8
arrItems2[444] = "FIFA 96";
arrItemsGrp2[444] = 8

function selectChange(control, controlToPopulate, ItemArray, GroupArray)
{
  var myEle ;
  var x ;
  // Empty the second drop down box of any choices
  for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
  if (control.name == "firstChoice") {
    // Empty the third drop down box of any choices
    for (var q=myChoices.thirdChoice.options.length;q>=0;q--) myChoices.thirdChoice.options[q] = null;
 }
  // ADD Default Choice - in case there are no values
  myEle = document.createElement("option") ;
  myEle.value = 0 ;
  myEle.text = "[Auswahl]" ;
  controlToPopulate.add(myEle) ;
  // Now loop through the array of individual items
  // Any containing the same child id are added to
  // the second dropdown box
  for ( x = 0 ; x < ItemArray.length  ; x++ )
    {
      if ( GroupArray[x] == control.value )
        {
          myEle = document.createElement("option") ;
          myEle.value = x ;
          myEle.text = ItemArray[x] ;
          controlToPopulate.add(myEle) ;
        }
    }
}
//  End -->
</script>

</HEAD>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Neue Seite 1</title>
</head>

<BODY>

<form name=myChoices>
<p align="center"><b><font size="6">Auswahl Menü</font></b></p>
<table align="center">
<tr>
<td>
<SELECT id=firstChoice name=firstChoice onchange="selectChange(this, myChoices.secondChoice, arrItems1, arrItemsGrp1);" size="1">
 <option value=0 SELECTED>[Auswahl]</option>
 <option value=1>Musik</option>
 <option value=2>Spiele</option>
 <option value=3>Filme</option>
</SELECT>
</TD><TD>
<SELECT id=secondChoice name=secondChoice onchange="selectChange(this, myChoices.thirdChoice, arrItems2, arrItemsGrp2);" size="1">
<option selected>[Auswahl]</option>
</SELECT>
<SELECT id=thirdChoice name=thirdChoice size="1">
<option selected>[Auswahl]</option>
</SELECT>
<SELECT id=thirdChoice0 name=thirdChoice0 size="1">
<option selected>[Auswahl]</option>
</SELECT></TD>
</TR>
</TABLE>
</form>

</body>

</html>

mfg Johann