moin peter_g :)
alert(document.Testform.Auswahl.options[i].id); <<<< JS Fehler
seit wann haben denn options ne id?
So kann das ja nich gehn ;)
In Anhlehnung an Eternius' Idee probier mal folgendes:
<html><head><title>Test</title>
<script type="text/javascript">
function CheckAuswahl () {
for (i = 0; i < document.Testform.Auswahl.length; ++i)
if (document.Testform.Auswahl.options[i].selected == true)
var myOption=document.Tesform.Auswahl.options[i];
alert(myOption.value);
myOption.value=myOption.getAttribute('value2');
alert(myOption.value);
}
</script>
</head><body>
<form name="Testform" action="">
<select name="Auswahl" size="2" onChange="CheckAuswahl()">
<option value="v1" id="id_v1" value2="blabla1">Blindauswahl 1</option>
<option value="v2" id="id_v2" value2="blabla2">Blindauswahl 2</option>
</select>
</form>
</body></html>
liebe Grüße aus Berlin
lina-
--
Self-Code: ie:% fl:( br:^ va:) ls:/ fo:| rl:( ss:) de:] js:| mo:)
Self-Code: ie:% fl:( br:^ va:) ls:/ fo:| rl:( ss:) de:] js:| mo:)