- That explains it ! :-)
Thanks a lot!!.... anyway I figured I better make my server return a xml document with the options and then use more JS to populate the select control.
Paul Donahue <scramjetter@...> wrote: Hi,
This is a known bug in IE:
There are several work arounds but rather than make one long post I
figured I'd just find the link and post it.
> I've been trying to populate a <select> control with some
> generated <option> tags (returned by some Ajax calls).('select1');
> This works perfectly in Firefox, however it does not work in IE.
> I have reduced the script (and the issue) to the code listed bellow,
> if you run the code in FF it works, if you run the same thing in IE,
> it doesn't (remember that for some reason Yahoo likes to add some
> spaces in code listings like the one bellow).
> Also, if you uncomment the alert line in the JS function, you'll see
> that IE is truncating the first opening <option> tag:
> function rewrite()
> var ddl = document.getElementById
> var tx = '<option value="1"selected="selected">Option No.
> 1</option><option value="2">Option No. 2</option><option()'>Select Box:</label>
> value="3">Option No. 3</option>';
> ddl.innerHTML = tx;
> <form name='form1' id='form1'>
> <label for='select1' onclick='rewrite
> <select id='select1' />---------------------------------
> Thanks for your help.
Pinpoint customers who are looking for what you sell.
[Non-text portions of this message have been removed]