drp2 ist beim ersten laden leer
Browser sowohl ie6 als auch firefox das gleiche Ergebnis
Browser sowohl ie6 als auch firefox das gleiche Ergebnis
$content .="<tr><td>".$lang['step_2_anbieter'].":</td><td>
<select name=anzeige_land size=1 onChange='update_drp2()' class=loginfeld>";
$content .= "<option value='DE'>".$lang['DE']."</option>
<option value='CH'>".$lang['CH']."</option>
<option value='OES'>".$lang['OES']."</option>
</select>";
$content .= "<select name='anzeige_anbieter' class=loginfeld>
<option>Start...</option>";
$an_DE = count($anbieter_DE);
$an_CH = count($anbieter_CH);
$an_OES = count($anbieter_OES);
$anbieter= $an_CH + $an_DE + $an_OES;
$head = "<script type='text/javascript'>
<!--
\tvar liste2=New Array($anbieter)
for(var i=0;i<liste2.length;i++)\n\t\tliste2[i]=new Array(2);";
for($n=1; $n < $an_DE; $n++)
{
$head .= "\tliste2[$n][0]=DE;\n\tliste2[$n][1]='".$anbieter_DE[$n]."';\n\tliste2[$n][2]='".$n."';\n";
}
for($k=1; $k < $an_CH; $k++)
{
$head .= "\tliste2[$k][0]=CH;\n\tliste2[$k][1]='".$anbieter_CH[$k]."';\n\tliste2[$n][2]='".$k."';\n";
}
for($m=1; $n <= $an_OES; $m++)
{
$head .= "\tliste2[$m][0]=OES;\n\tliste2[$m][1]='".$anbieter_OES[$m]."';\n\tliste2[$n][2]='".$m."';\n";
}
$head .= "function update_drp2() {
var x=document.form.anzeige_anbieter.length;
for(var n=0; n<x; n++)
document.form.anzeige_anbieter.options[0]=null;
for(n=0; n<liste2.length; n++) {
if(liste2[n][0]==document.form.anzeige_land.value) {
var NeuerEintrag=new Option(liste2[n][1], liste2[n][0]);
document.form.anzeige_anbieter.options[document.form.anzeige_anbieter.length]=NeuerEintrag;
}
}
}
-->
</script>";
$content .= "</td></tr>";
<script type='text/javascript'>
<!--
var liste2=New Array(93)
for(var i=0;i<liste2.length;i++)
liste2[i]=new Array(2); liste2[1][0]=DE;
liste2[1][1]='E-Plus';
liste2[1][2]='1';
liste2[68][0]=DE;
liste2[68][1]='Weltbild';
liste2[68][2]='68';
liste2[1][0]=CH;
liste2[1][1]='Orange';
liste2[1][2]='1';
liste2[2][0]=CH;
liste2[2][1]='sunrise';
liste2[2][2]='2';
...................
liste2[12][0]=CH;
liste2[12][1]='The Phone House';
liste2[12][2]='12';
liste2[1][0]=OES;
liste2[1][1]='A1';
liste2[1][2]='1';
...................
liste2[11][0]=OES;
liste2[11][1]='Mobile Call';
liste2[11][2]='11';
function update_drp2() {
var x=document.form.anzeige_anbieter.length;
for(var n=0; n<x; n++)
document.form.anzeige_anbieter.options[0]=null;
for(n=0; n<liste2.length; n++) {
if(liste2[n][0]==document.form.anzeige_land.value) {
var NeuerEintrag=new Option(liste2[n][1], liste2[n][0]);
document.form.anzeige_anbieter.options[document.form.anzeige_anbieter.length]=NeuerEintrag;
}
}
}
-->
</script>
<form method=POST name=form action='verkaufen.php?action=step_3'> <select name=anzeige_land size=1 onChange='update_drp2()' class=loginfeld> <option value='DE'>Deutschland</option> <option value='CH'>Schweiz</option> <option value='OES'>Österreich</option> </select> <select name='anzeige_anbieter' class=loginfeld> <option>Start...</option> </form> <script type="text/javascript"> <!-- update_drp2() --> </script>
Kommentar