"Evertjan." <no**@none.nl> wrote in message
news:Xn********************@194.109.133.29...
john <wenjoh26@em*********@pct.edu> wrote in
news:Xn*********************************@216.65.9 8.9:if I have
if (document.form[0].element[0].type == "select")
and I have a form with at liest 1 element on the page
this should work right?
I keep getting a "document.form.0 is null or not an object"
message any idea why?
document.forms[0].elements[0].
However, from the W3C HTML DOM specs:-
Interface HTMLSelectElement
type of type DOMString, readonly.
The type of this form control. This is the string
"select-multiple" when the multiple attribute is true
and the string "select-one" when false.
-so comparison with the string "select" should not be expected to work.
But, IceBrowser 5 is an example of at least one browser that erroneously
assigns the string "select" to the - type - property of a SELECT element
so it might be best to check to see if the - type - property contains
the substring "select" (and then maybe the - multiple - property if that
is important).
Richard.