OBJECT:  Reset


A Reset object (a 'Reset' button) is created with every instance of an HTML <INPUT> tag (with a 'type' value set as 'RESET') on a form. Clicking this button resets the values of all form elements back to their defaults. These objects are stored in the elements array of the parent form and accessed using either the name defined within the HTML tag or an integer (with '0' being the first element defined, in source order, in the specified form).

PROPERTIES

form Property
This property returns a reference to the Reset object's parent form.

Syntax: object.form

name Property
This property sets or returns the value of the Reset object's name attribute.

Syntax: object.name

type Property
Every element on a form has an associated type property. In the case of a Reset object, the value of this property is always "reset".

Syntax: object.type

value Property
This property sets or returns the Submit object's value attribute. This is the text that is actually displayed on the button face. If this is not defined within the HTML tag the string 'Reset' is used by default.

Syntax: object.value


METHODS

blur Method
This method removes the focus from the specified reset button.

Syntax: object.blur( )

click Method
This method simulates a mouse-click on the reset button.

Syntax: object.click( )

focus Method
This method gives focus to the specified reset button.

Syntax: object.focus( )

handleEvent Method
This method calls the handler for the specified event.

Syntax: object.handleEvent(event)


EVENT HANDLERS

onBlur Event handler
This event handler executes some specified JavaScript code on the occurrence of a blur event (when the Reset object loses focus).

Syntax: object.onBlur="myJavaScriptCode"

onClick Event handler
This event handler executes some specified JavaScript code on the occurrence of a click event (when the reset button is clicked).

Syntax: object.onClick="myJavaScriptCode"

onFocus Event handler
This event handler executes some specified JavaScript code on the occurrence of a focus event (when the reset button receives focus).

Syntax: object.onFocus="myJavaScriptCode"


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information