Click to return to the Reusing Browser Technology home page    
IHTMLFontSizesCollection:...     IHTMLFormElement::get_act...     Interfaces and Scripting ...    
Web Workshop  |  Reusing Browser Technology

IHTMLFormElement Interface


This interface specifies that the contained controls take part in a form.

IHTMLFormElement Methods

get_action Retrieves the address to be used to carry out the action of the form. If none is specified, the base URL of the document is used.
get_dir Retrieves the direction value for the form. The direction represents the direction of the text on the form.
get_elements Retrieves an interface pointer to a zero-based collection of the elements in the form.
get_encoding Retrieves the mime-encoding for the form.
get_length Retrieves the number of elements in a collection.
get_method Retrieves how the form data should be sent to the server, either as GET or POST.
get_name Retrieves the name of the control, bookmark, or application.
get_newEnum Retrieves an enumerator interface that can be used to iterate through the form element collection.
get_onreset Retrieves a pointer to the event handler function associated with the onreset event for a FORM element.
get_onsubmit Retrieves a pointer to the event handler function associated with the onsubmit event for a FORM element.
get_target Retrieves the window or frame to target the contents at.
item Retrieves an element or a collection from the given collection.
put_action Sets the address to be used to carry out the action of the form. If none is specified, the base URL of the document is used.
put_dir Sets the form's direction property. The direction represents the direction of the text on the form.
put_encoding Sets the mime encoding for the form.
put_length Sets the number of elements in a collection.
put_method Sets how the form data should be sent to the server, either as GET or POST.
put_name Sets the name of the control, bookmark, or application.
put_onreset Sets a pointer to the event handler function associated with the onreset event for a FORM element.
put_onsubmit Sets a pointer to the event handler function associated with the onsubmit event for a FORM element.
put_target Sets the window or frame to target the contents at.
reset Simulates a mouse click on a reset button
submit Submits the form and fires the onsubmit event.
tags Retrieves a collection of all elements in the given collection that have the given HTML tag name.

Interface Information

Implementation System (Mshtml.dll)
Inherits from IDispatch
Header and IDL files Mshtml.h, Mshtml.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

Remarks

When programming the form, all control-like elements are added to the form as named items. In addition, these items are exposed through the IHTMLFormElement::item method.

When the focus is on a control in a form, pressing the ESC key once causes the value of the control to revert back to the last value, and pressing the ESC key again resets the form.

If one and only one text box is on a form, pressing ENTER fires the onsubmit event. If the form has a submit button, the button appears with a dark border, indicating that pressing ENTER submits the form.

The FORM element is a block element.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.