PHP interesse |
|
Haytjes dit lijkt op jou script over navpanel dus ik denk wel dat jij het weet!
Even een vraag van mij :
Als je bijvoorbeeld 3 select listen hebt:
Dus zo:
<form name="form1">
<td valign=top>
<SELECT NAME="wedstrijden" MULTIPLE SIZE="2"onclick="a()" onchange="a()">
<OPTION VALUE="1">Intern</option>
<OPTION VALUE="2">Extern</option>
</SELECT>
</td>
<td width="200" valign="top">
<SELECT NAME="competitie" MULTIPLE SIZE="20" onclick="a()" onchange="a()">
<OPTION id="option1.1" VALUE="1">Selecteer een wedstrijd</option>
<OPTION id="option1.2" VALUE="2"></option>
<OPTION id="option1.3" VALUE="3"></option>
<OPTION id="option1.4" VALUE="3"></option>
<OPTION id="option1.5" VALUE="5"></option>
<OPTION id="option1.6" VALUE="6"></option>
<OPTION id="option1.7" VALUE="7"></option>
<OPTION id="option1.8" VALUE="8"></option>
<OPTION id="option1.9" VALUE="9"></option>
<OPTION id="option1.10" VALUE="10"></option>
<OPTION id="option1.11" VALUE="11"></option>
<OPTION id="option1.12" VALUE="12"></option>
<OPTION id="option1.13" VALUE="13"></option>
<OPTION id="option1.14" VALUE="14"></option>
<OPTION id="option1.15" VALUE="15"></option>
<OPTION id="option1.16" VALUE="16"></option>
<OPTION id="option1.17" VALUE="17"></option>
<OPTION id="option1.18" VALUE="18"></option>
<OPTION id="option1.19" VALUE="19"></option>
<OPTION id="option1.20" VALUE="20"></option>
</SELECT>
</td>
<td width="200" valign="top">
<SELECT NAME="wit1" MULTIPLE SIZE="20" onclick="a()" onchange="a()">
<OPTION id="option2.1" VALUE="1">Selecteer een groep/klasse</option>
<OPTION id="option2.2" VALUE="2"></option>
<OPTION id="option2.3" VALUE="3"></option>
<OPTION id="option2.4" VALUE="3"></option>
<OPTION id="option2.5" VALUE="5"></option>
<OPTION id="option2.6" VALUE="6"></option>
<OPTION id="option2.7" VALUE="7"></option>
<OPTION id="option2.8" VALUE="8"></option>
<OPTION id="option2.9" VALUE="9"></option>
<OPTION id="option2.10" VALUE="10"></option>
<OPTION id="option2.11" VALUE="11"></option>
<OPTION id="option2.12" VALUE="12"></option>
<OPTION id="option2.13" VALUE="13"></option>
<OPTION id="option2.14" VALUE="14"></option>
<OPTION id="option2.15" VALUE="15"></option>
<OPTION id="option2.16" VALUE="16"></option>
<OPTION id="option2.17" VALUE="17"></option>
<OPTION id="option2.18" VALUE="18"></option>
<OPTION id="option2.19" VALUE="19"></option>
<OPTION id="option2.20" VALUE="20"></option>
</SELECT>
</td>
</tr>
</form>
<form name="form1"> <td valign=top> <SELECT NAME="wedstrijden" MULTIPLE SIZE="2"onclick="a()" onchange="a()"> <OPTION VALUE="1">Intern</option> <OPTION VALUE="2">Extern</option> </SELECT> </td> <td width="200" valign="top"> <SELECT NAME="competitie" MULTIPLE SIZE="20" onclick="a()" onchange="a()"> <OPTION id="option1.1" VALUE="1">Selecteer een wedstrijd</option> <OPTION id="option1.2" VALUE="2"></option> <OPTION id="option1.3" VALUE="3"></option> <OPTION id="option1.4" VALUE="3"></option> <OPTION id="option1.5" VALUE="5"></option> <OPTION id="option1.6" VALUE="6"></option> <OPTION id="option1.7" VALUE="7"></option> <OPTION id="option1.8" VALUE="8"></option> <OPTION id="option1.9" VALUE="9"></option> <OPTION id="option1.10" VALUE="10"></option> <OPTION id="option1.11" VALUE="11"></option> <OPTION id="option1.12" VALUE="12"></option> <OPTION id="option1.13" VALUE="13"></option> <OPTION id="option1.14" VALUE="14"></option> <OPTION id="option1.15" VALUE="15"></option> <OPTION id="option1.16" VALUE="16"></option> <OPTION id="option1.17" VALUE="17"></option> <OPTION id="option1.18" VALUE="18"></option> <OPTION id="option1.19" VALUE="19"></option> <OPTION id="option1.20" VALUE="20"></option> </SELECT> </td> <td width="200" valign="top"> <SELECT NAME="wit1" MULTIPLE SIZE="20" onclick="a()" onchange="a()"> <OPTION id="option2.1" VALUE="1">Selecteer een groep/klasse</option> <OPTION id="option2.2" VALUE="2"></option> <OPTION id="option2.3" VALUE="3"></option> <OPTION id="option2.4" VALUE="3"></option> <OPTION id="option2.5" VALUE="5"></option> <OPTION id="option2.6" VALUE="6"></option> <OPTION id="option2.7" VALUE="7"></option> <OPTION id="option2.8" VALUE="8"></option> <OPTION id="option2.9" VALUE="9"></option> <OPTION id="option2.10" VALUE="10"></option> <OPTION id="option2.11" VALUE="11"></option> <OPTION id="option2.12" VALUE="12"></option> <OPTION id="option2.13" VALUE="13"></option> <OPTION id="option2.14" VALUE="14"></option> <OPTION id="option2.15" VALUE="15"></option> <OPTION id="option2.16" VALUE="16"></option> <OPTION id="option2.17" VALUE="17"></option> <OPTION id="option2.18" VALUE="18"></option> <OPTION id="option2.19" VALUE="19"></option> <OPTION id="option2.20" VALUE="20"></option> </SELECT> </td> </tr> </form>
en dan dit script erbij:
<script language="JavaScript" type="text/javascript">
<!--
var aa = Array ('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20')
var intern = Array('Groep1','Groep2','Groep3','Groep4','Groep5','Topjeugd','','','','','','','','','','','','','','');
intern['Groep1'] = Array('Gino de Mon','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 1 invoeren !
intern['Groep2'] = Array('2','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 2 invoeren !
intern['Groep3'] = Array('3','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 3 invoeren !
intern['Groep4'] = Array('4','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 4 invoeren !
intern['Groep5'] = Array('5','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 5 invoeren !
intern['Topjeugd'] = Array('Top','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers Topjeugd invoeren !
var extern = Array('Promotieklasse','','','','','','','','','','','','','','','','','','','');
extern['Promotieklasse']= Array('Baarn 1','Regiohakkers','De Rode Loper 1','Zeist 2','Utrecht 4','Amersfoort 3','Amersfoort 2','Ons Genoegen','HSG 3','Sv Rivierenland','','','','','','','','','',''); //
var y = aa.length;
function a()
{
for(x=0;x<y;x++)
{
{
if (document.form1.wedstrijden.value == "1")
{
document.getElementById('option1.'+aa[x]).innerHTML = intern[x];
}
else
{
if (document.form1.wedstrijden.value == "2")
{
document.getElementById('option1.'+aa[x]).innerHTML = extern[x];
}
}
}
}
for(x=0;x<7;x++)
{
{
if ((document.form1.wedstrijden.value == "1") && (document.form1.competitie.value == [x]))
{
for(q=0;q<y;q++)
{
document.getElementById('option2.'+aa[q]).innerHTML = intern[][q];
document.getElementById('option3.'+aa[q]).innerHTML = intern[][q];
}
}
else
{
if ((document.form1.wedstrijden.value == "2") && (document.form1.competitie.value == "1"))
{
for(z=0;z<y;z++)
{
document.getElementById('option2.'+aa[x]).innerHTML = extern[][z];
document.getElementById('option3.'+aa[x]).innerHTML = extern[][z];
}
}
}
}
}
}
//-->
</script>
<script language="JavaScript" type="text/javascript"> <!-- var aa = Array ('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20') var intern = Array('Groep1','Groep2','Groep3','Groep4','Groep5','Topjeugd','','','','','','','','','','','','','',''); intern ['Groep1'] = Array('Gino de Mon','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 1 invoeren !intern ['Groep2'] = Array('2','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 2 invoeren !intern ['Groep3'] = Array('3','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 3 invoeren !intern ['Groep4'] = Array('4','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 4 invoeren !intern ['Groep5'] = Array('5','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers groep 5 invoeren !intern ['Topjeugd'] = Array('Top','Jesse Meijer','Koen Postma','Lars Terlingen','Noah Brey','Yme Brantjes','','','','','','','','','','','','','',''); // Spelers Topjeugd invoeren ! var extern = Array('Promotieklasse','','','','','','','','','','','','','','','','','','',''); extern ['Promotieklasse']= Array('Baarn 1','Regiohakkers','De Rode Loper 1','Zeist 2','Utrecht 4','Amersfoort 3','Amersfoort 2','Ons Genoegen','HSG 3','Sv Rivierenland','','','','','','','','','',''); // var y = aa.length; function a() { for(x=0;x<y;x++) { { if (document.form1.wedstrijden.value == "1") { document.getElementById('option1.'+aa[x]).innerHTML = intern[x]; } else { if (document.form1.wedstrijden.value == "2") { document.getElementById('option1.'+aa[x]).innerHTML = extern[x]; } } } } for(x=0;x<7;x++) { { if ((document.form1.wedstrijden.value == "1") && (document.form1.competitie.value == [x])) { for(q=0;q<y;q++) { document.getElementById('option2.'+aa[q]).innerHTML = intern[][q]; document.getElementById('option3.'+aa[q]).innerHTML = intern[][q]; } } else { if ((document.form1.wedstrijden.value == "2") && (document.form1.competitie.value == "1")) { for(z=0;z<y;z++) { document.getElementById('option2.'+aa[x]).innerHTML = extern[][z]; document.getElementById('option3.'+aa[x]).innerHTML = extern[][z]; } } } } } } //--> </script>
Hoe maak je dit script dan goed werkend. Het gaat namelijk om deze stukken:
document.getElementById('option2.'+aa[q]).innerHTML = intern[][q];
document.getElementById('option3.'+aa[q]).innerHTML = intern[][q];
document.getElementById('option2.'+aa[q]).innerHTML = intern[][q]; document.getElementById('option3.'+aa[q]).innerHTML = intern[][q];
Wat moet ik voor intern[] of de extern[x] tussen de "[]" invullen om het script goed werkend te maken ?? |