la***********@zipmail.com wrote on 12 mrt 2007 in comp.lang.javascript
:
What is a cross-browser way to get the size (number of visible items)
of a SELECT element?
If you mean the number of select options:
var n = document.getElementById('mySelectId').options.leng th
If that is not possible, how would I determine
if the element was of a MULTIPLE type or not?
If the select is multiple?
var m = document.getElementById('mySelectId').multiple
IE7 and FF2 tested.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)