IE 6 does not return the value of a dynamic option list. Mozilla
performs fine. How can I get the value of a choice in IE?
Simple example below. Option list is filled with first element of array
store.
Arjen
<html>
<head>
<script language="javascript" type="text/javascript">
var store = new Array();
store[1] = new Array([3,0,0],[4,0,1],[5,0,1]);
store[2] = new
Array(['13',0,0],['14',0,0],['15',0,0],['16',0,1],['18',0,0]);
function vuldikte()
{
var box = document.offerte.soort;
var number = box.options[box.selectedIndex].value;
var list = store[number];
var diktelijst= document.offerte.breedte;
diktelijst.options.length = null;
for(i=0;i<list.length;i+=1)
{
diktelijst.options[i] = new Option(list[i][0]);
alert(diktelijst.options[i].value);
// !! ----> ie 6 returns empty value of the options list, WHY ?
}
}
</script>
</head>
<body>
<form name="offerte">
<select class="invoer" name="soort" size="1" onchange="vuldikte()">
<option value="1">Klein</option>
<option value="2">Groot</option>
</select>
<select class="invoer" name="breedte" size="1">
<option value="10">Kies option</option>
</select> breedte
</form>
</body>
</html>