Hallo erstmal ;-)
Ich habe versucht, das im Internet befindliche Triple-Combo Auswahl Menue, auf 4 zu erweitern, also um eine Verschachelung mehr. Falls jemand schon mal dieses Script um eine Verschachelung mehr gescript hat, kann es ja mal posten.
Finde aber leider den Fehler nicht, er sagt immer im 4-ten Select Feld "unbekannt"
Habe auch nirgendwo eine Anleitung oder Anhaltspunkte gefunden ...
Hier der OrginalCode von dem Triple-Combo:
http://javascriptkit.com/script/script2/triplecombo.shtml
----------------------------------------------------------------------------
Hier der Code von den 4-Level-Combo ;-)
Waere um Vorschlaege Dankbar....
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<TR>
<TD align=center width="16%">
<DIV id=content>
<DIV class=text>
Gebäude
</DIV>
</DIV>
</TD>
<TD nowrap height="11">
<DIV id=content>
<select name="neu_gebaeude" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>auswählen</option>
<option>01</option>
</select>
</DIV>
</td>
<TD align=center width="16%">
<DIV id=content>
<DIV class=text>
Technikraum
</DIV>
</DIV>
</TD>
<td nowrap height="11">
<DIV id=content>
<select name="neu_raum_technik" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected>auswählen</option>
<option value=" ">auswählen</option>
<option value=" ">auswählen</option>
</select>
</DIV>
</td>
<TD align=center width="16%">
<DIV id=content>
<DIV class=text>
Netzwerkschrank
</DIV>
</DIV>
</TD>
<td nowrap height="11">
<DIV id=content>
<select name="neu_schrank" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected>auswählen</option>
<option value=" ">auswählen</option>
<option value=" ">auswählen</option>
</select>
</DIV>
</td></tr>
<TR><TD align=center width="16%">
<DIV id=content>
<DIV class=text>
Koordinate_1
</DIV>
</DIV>
</TD>
<td nowrap height="11">
<DIV id=content>
<select name="neu_koordinate_1" size="1">
<option value=" " selected>auswählen</option>
<option value=" ">auswählen</option>
<option value=" ">auswählen</option>
</select>
</DIV>
</td>
<script>
<!--
var groups=document.isc.neu_gebaeude.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("auswählen"," ");
// Gebaeude 1
group[1][0]=new Option("nun auswählen"," ");
group[1][1]=new Option("117","117");
var temp=document.isc.neu_raum_technik
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[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}
var secondGroups=document.isc.neu_raum_technik.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
// Gebaeude 1
// Raum 117
secondGroup[1][0][0]=new Option("auswählen"," ");
secondGroup[1][1][0]=new Option("nun auswählen"," ");
secondGroup[1][1][1]=new Option("S01","1");
var temp1=document.isc.neu_schrank
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.neu_gebaeude.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.neu_gebaeude.options.selectedIndex][y][i].text,
secondGroup[document.isc.neu_gebaeude.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
redirect2(0)
}
var thirdGroups=document.isc.neu_schrank.options.length
var thirdGroup=new Array(groups)
for (i=0; i<groups; i++) {
thirdGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
thirdGroup[i][j]=new Array(secondGroup[i][j].length)
for (k=0; k<secondGroup[i][j].length; k++) {
thirdGroup[i][j][k]=new Array() }}}
// Gebaeude 1
// Raum 117
//S01
thirdGroup[1][0][0][0]=new Option("auswählen"," ");
thirdGroup[1][1][0][0]=new Option("nun auswählen"," ");
thirdGroup[1][1][1][1]=new Option("A","A");
thirdGroup[1][1][1][2]=new Option("B","B");
thirdGroup[1][1][1][3]=new Option("C","C");
thirdGroup[1][1][1][4]=new Option("D","D");
thirdGroup[1][1][1][5]=new Option("E","E");
var temp2=document.isc.neu_koordinate_1
function redirect2(z){
for (m=temp2.options.length-1;m>0;m--)
temp2.options[m]=null
for (i=0;i<thirdGroup[document.isc.neu_gebaeude.options.selectedIndex][z].length;i++){
temp2.options[i]=new Option(thirdGroup[document.isc.neu_gebaeude.options.selectedIndex][z][i].text,
thirdGroup[document.isc.neu_gebaeude.options.selectedIndex][z][i].value)
}
for (j=0;j<thirdGroup[document.isc.neu_schrank.options.selectedIndex][z].length;j++){
temp2.options[i]=new Option(thirdGroup[document.isc.neu_schrank.options.selectedIndex][z][i][j].text,
thirdGroup[document.isc.neu_schrank.options.selectedIndex][z][i][j].value)
}
temp2.options[0].selected=true
}
function redirect3(a){
window.location=temp2[a].value
}
//-->
</script>
</FORM>