By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

Reliability/Availability of Option, Select, etc. objects

P: n/a
I cannot find references to the use of code like the following
anywhere in the W3C DOM:

var select = document.getElementById ('myselect');
select.options[select.options.length] = new Option ('string',
'string');

In other words, which W3C document standardizes the "new Option"
interface? Or does this fall into the category of the mythical "DOM
0" interface, documented nowhere but implemented everywhere?

AFAIK, the W3C DOM specifies the existence of objects which implement
the interfaces of HTMLSelectElement, HTMLOptionElement, and so on, but
it does not actually specify the ability to actually instantiate an
HTMLOptionElement outside of the Document.createElement method.

I suppose it just means that for hysterical reasons, everyone needs to
support the original Netscpae interface including the legacy Objects,
so I might as well join the crowd, even though the Gecko DOM reference
makes no reference to them.

/Joe
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joe,

I think "new Option" belongs to the realm of JavaScript.

http://devedge.netscape.com/library/...3/reference/op
tion.html

--
HTH,
DWilliams

"Joe Kelsey" <jo****@zircon.seattle.wa.us> wrote in message
news:15**************************@posting.google.c om...
I cannot find references to the use of code like the following
anywhere in the W3C DOM:

var select = document.getElementById ('myselect');
select.options[select.options.length] = new Option ('string',
'string');

In other words, which W3C document standardizes the "new Option"
interface? Or does this fall into the category of the mythical "DOM
0" interface, documented nowhere but implemented everywhere?

AFAIK, the W3C DOM specifies the existence of objects which implement
the interfaces of HTMLSelectElement, HTMLOptionElement, and so on, but
it does not actually specify the ability to actually instantiate an
HTMLOptionElement outside of the Document.createElement method.

I suppose it just means that for hysterical reasons, everyone needs to
support the original Netscpae interface including the legacy Objects,
so I might as well join the crowd, even though the Gecko DOM reference
makes no reference to them.

/Joe

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.