On Sep 26, 7:08 am, MorningZ <[EMAIL PROTECTED]> wrote:
> "So I tried the "standard" way:
>
> document.getElementById("emplist").length"
>
> that *should* be
>
> document.getElementById("emplist").options.length;

*Should*?  The HTMLSelectElement has a length property that is the
number of options in the select, so if emplist is a select element,
its length property is the number of options it has.

<URL: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5933486 >

Select elements also have an options property that is an HTML
collection of the options in the select.  It also has a length
property that is the same as the select’s length property.

i.e.

  someSelect.length == someSelect.options.length;


in conforming implementations of the W3C DOM 2 HTML specification.


--
Rob

Reply via email to