> On May 15, 10:08 pm, work.Yeh
@gmail.com wrote:
> > This script will work only width Firefox browser
> > <select id='object'>
> > </select>
> A select with no options is invalid HTML.
> > document.getElementById(abject).innerHTML= '<option>yehuda'
> I guess you mean:
> document.getElementById('object')...
> > For some reason the Explorer browser doesn't refer to the options
> > inside a select box as an innerHTML object
> innerHTML isn't an object, it's a property of a DOM object/element.
> > How can I make it work width Epxlorer?
> Use:
> var select = document.getElementById('object');
> select.options[select.options.length] = new Option('yehuda');
> You could also use:
> var select = document.getElementById('object');
> var oOption = document.createElement('option');
> oOption.appendChild(document.createTextNode('yehuda'));
> select.appendChild(oOption);
> --
> Rob
thanks