To add options to a select element, use
select.options.add(new Option('innerText', 'value'))
While using
document.createElement('option') works, IE has issues if you attempt to
select.appendChild(...) such a newly created option
- attempt to set
select.value = {new option's value}
via a button — it tends to totally ignore the new assignment unless the new option is the only one in the select
The above works in IE 6.0 and Firefox 1.5.