473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

dynamic select: query value option in IE6 returns empty, mozillaoke why

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>&nbsp;breedte
</form>
</body>
</html>
Jul 23 '05 #1
1 2254
Arjen <ar*****************@nowhere.com> writes:
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.
Try: diktelijst.options.length = null; ... = 0;
and: diktelijst.options[i] = new Option(list[i][0]);

... = new Option(list[i][0], list[i][0]);

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
7
by: Bertman105 | last post by:
Hey all, Heres the situation: I have a form page that needs to have multiple drop down menus that is pulling their options from a database. Right now I have one working out of 3. So that is one...
4
by: PM ArunKumar | last post by:
i have two dropdown list in my form where the values in the list of second drop down changes based on the value i select in the first dropdown.(very similar to country and states list), here after...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
1
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.