A
Andreas Wohlhaupter
Hi all,
I have an HTML form with an OPTION tag and one SELECT field in it
(value 0, text "none"). I want to fill the other options dynamically
with javascript.
Creating all the options with doc.createElement('OPTION') and setting
the value and innerText properties works fine. But when I want to set
the number of the option-field, that should be selected, this doesn´t
alway work:
o.value = unescape (arr[field])
(where o is my select field)
o.value is still 0 after this assignment. But if I put in an alert
into the line before, it works. It seems, that the IE hasn´t filled
all the option fields until that moment, i make my assignment.
Is there any possibility to find out, whether the IE has finished
creating all the elements? Some kind of readystate attribute as it
exists for whole documents?
Thanks a lot.
Andreas
I have an HTML form with an OPTION tag and one SELECT field in it
(value 0, text "none"). I want to fill the other options dynamically
with javascript.
Creating all the options with doc.createElement('OPTION') and setting
the value and innerText properties works fine. But when I want to set
the number of the option-field, that should be selected, this doesn´t
alway work:
o.value = unescape (arr[field])
(where o is my select field)
o.value is still 0 after this assignment. But if I put in an alert
into the line before, it works. It seems, that the IE hasn´t filled
all the option fields until that moment, i make my assignment.
Is there any possibility to find out, whether the IE has finished
creating all the elements? Some kind of readystate attribute as it
exists for whole documents?
Thanks a lot.
Andreas