Reliability/Availability of Option, Select, etc. objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Kelsey

    #1

    Reliability/Availability of Option, Select, etc. objects

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

    var select = document.getEle mentById ('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 HTMLSelectEleme nt, HTMLOptionEleme nt, and so on, but
    it does not actually specify the ability to actually instantiate an
    HTMLOptionEleme nt outside of the Document.create Element 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
  • DWilliams

    #2
    Re: Reliability/Availability of Option, Select, etc. objects

    Joe,

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


    tion.html

    --
    HTH,
    DWilliams

    "Joe Kelsey" <joe-gg@zircon.seatt le.wa.us> wrote in message
    news:151bebc0.0 309021217.1a354 e5c@posting.goo gle.com...[color=blue]
    > I cannot find references to the use of code like the following
    > anywhere in the W3C DOM:
    >
    > var select = document.getEle mentById ('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 HTMLSelectEleme nt, HTMLOptionEleme nt, and so on, but
    > it does not actually specify the ability to actually instantiate an
    > HTMLOptionEleme nt outside of the Document.create Element 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[/color]


    Comment

    Working...