Hallo,
ich habe folgenden Quellcode:
<form action="#">
<p id="selectyear">Jahr auswählen:
<select id="yl" size="1" onchange="makePOSTRequest('url', 'year='+this.options[this.selectedIndex].value, 'text/html'); ">
<option selected="selected">2007</option>
<option>2006</option>
<option>2005</option>
<option>2004</option>
<option>2003</option>
<option>2002</option>
<option>2001</option>
</select>
</p>
</form>
Im Mozilla und im Opera funktioniert das auch wunderbar. Nur der IE7 zickt rum.
this.options[this.selectedIndex].value
~~~enthält bei ihm nicht den ausgewählten Wert. Ich habe es auch schon mit
~~~javascript
getElementById('yl').options[getElementById('yl').selectedIndex].value
ausprobiert, aber ebenfalls Fehlanzeige.
Mit
alert(getElementById('yl').options[getElementById('yl').selectedIndex].value);
erhält man nur eine leere MessageBox.
Wie bekomme ich mit dem IE7 an den gerade in der Selectbox ausgewählten Wert heran.
Gruß,
Henning
--
Gruß aus Braunschweig
SELF-Code: sh:( fo:| ch:{ rl:( br:> n4:( ie:( mo:) va:) de:] zu:} fl:( ss:| ls:<
http://emmanuel.dammerer.at/selfcode.html
http://www.peter.in-berlin.de/projekte/selfcode/?code=sh%3A(+fo%3A|+ch%3A{+rl%3A(+br%3A>+n4%3A(+ie%3A(+mo%3A)+va%3A)+de%3A]+zu%3A}+fl%3A(+ss%3A|+ls%3A<+js%3A|
Gruß aus Braunschweig
SELF-Code: sh:( fo:| ch:{ rl:( br:> n4:( ie:( mo:) va:) de:] zu:} fl:( ss:| ls:<
http://emmanuel.dammerer.at/selfcode.html
http://www.peter.in-berlin.de/projekte/selfcode/?code=sh%3A(+fo%3A|+ch%3A{+rl%3A(+br%3A>+n4%3A(+ie%3A(+mo%3A)+va%3A)+de%3A]+zu%3A}+fl%3A(+ss%3A|+ls%3A<+js%3A|