[thelist] JS typeof operator limitations

MRC webmaster at equilon-mrc.com
Fri Nov 30 15:01:29 CST 2001


Rory,

> > The only way around this is to check the type property... for forms, it
is
> > undefined (i.e. == null in IE), for elements, it is the type of the
> element.
>
>     In IE 4+, you can always check for the tagName of the particular
> element. Keep in mind that tagNames are always in UPPER case.

    ...Also (my mind's running a bit sluggish today :), if you use
<fieldset> elements within your forms, they are included in the elements
collection (in both IE 4+ and Netscape 6) with a type value of "undefined".

James Aylard





More information about the thelist mailing list