form HTML Object
The form object represents an HTML input form. It corresponds to the FORM HTML element.
Properties
Property | Data type | Access | Description |
---|---|---|---|
action | String | Read/write | Specifies the URL where the form content is sent for processing. |
encoding | String | Read/write
Note Read-only for devices running Smartphone 2002 and Pocket PC 2000 software. |
Specifies the MIME encoding for the form data when the form is submitted.
Although writable, the value of this property is always application/x-www-form-urlencoded. |
method | String | Read/write | Specifies how the form data is sent to the server. The only valid values are post and get.
get specifies that the data is appended to the URL specified by the action property. put specifies that the data is sent in the body of the HTTP request. |
name | String | Read-only | Retrieves the name of the form. |
target | String | Read/write | Specifies the name of the frame or window where the results of submitting a form are displayed. |
Events
Event | Description |
---|---|
onreset | Occurs when a form is about to be reset or when the reset method is called.
Note Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later. |
onsubmit | Occurs when a form is about to be submitted and only when the submit is initiated by the user. It does not occur if the submit method is called on the form. |
Methods
Method | Syntax | Description |
---|---|---|
reset | form.reset | Simulates a mouse click on the reset button, which resets the form back to its initial state. This method first invokes the onreset event. |
submit | form.submit | Submits the form but does not invoke the onsubmit event. |
Collections
The following collection is supported for the form object:
Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
See Also
Internet Explorer Mobile HTML Objects
Send Feedback on this topic to the authors