The information in this article applies to:
SYMPTOMS
Internet Explorer 3.x does not support a "type" property on its elements.
In Netscape Navigator, "type" returns a string identifying the type of
intrinsic element ("check box", "text", and so forth) It's essentially the
TYPE attribute of the INPUT tag. Internet Explorer 4.0 does support this to
achieve compatibility with Netscape Navigator.
CAUSEThe versions of Internet Explorer listed above do not support a type property on form elements. RESOLUTION
In order to generically determine the element being enumerated in the form
collection, identify all the elements that could possibly appear within a
form, look at their properties, and determine which property is unique. For
example, to determine if an element is a check box, the checked property
will return true or false in JScript. If the element is not a check box,
the checked property will return the special value null.
For a quick look at all the methods and properties supported by the
intrinsic objects, take a look at Intrinsc.ocx using a tool like OLEVIEW.
The coclasses represent the objects, and the default interfaces that these
coclasses support reveals the properties. Hopefully there's something
unique about each of the supported classes.
STATUSAll form elements in Internet Explorer 4.0 support a "type" property. MORE INFORMATIONSteps to Reproduce BehaviorThe following code demonstrates that Internet Explorer 3.0 does not support a type property on form elements. The same code runs as expected in Netscape Navigator 3.0.
REFERENCESFor more information, please see the MSDN Web Workshop: http://msdn.microsoft.com/workshop/default.asp Additional query words:
Keywords : kbcode kbScript kbHTMLObj |
Last Reviewed: May 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |