OBJECT:
Checkbox
A
Checkbox object is created with every instance of an
HTML <INPUT> tag (with a 'type' value set as 'checkbox') on a Form.
These objects are then 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
checked Property
This property is a boolean value that sets or returns the current state
of the Checkbox object; true if checked and false otherwise.
Syntax: checkbox.checked
defaultChecked Property
This property sets or returns the default value of the checked
property.
Syntax: checkbox.defaultChecked
form Property
This property returns a reference to the Checkbox object's parent
Form.
Syntax: checkbox.form
name Property
This property sets or returns the Checkbox object's Name
attribute.
Syntax: checkbox.name
type Property
Every element on a form has an associated Type property. In the
case of a Checkbox object, the value of this property is always
"checkbox".
Syntax: checkbox.type
value Property
This property sets the Value that is returned when the Checkbox
is checked.
Syntax: checkbox.value
METHODS
blur Method
This method removes the Focus from the specified Checkbox
object.
Syntax: checkbox.blur(
)
click Method
This method simulates a mouse-click on the Checkbox object.
Syntax: checkbox.click(
)
focus Method
This method gives Focus to the specified Checkbox object.
Syntax: checkbox.focus(
)
handleEvent Method
This method calls the handler for the specified Event.
Syntax: checkbox.handleEvent(event)
EVENT HANDLERS
onBlur Event handler
This event handler executes some specified JavaScript code on the occurrence
of a Blur event (when the Checkbox object loses focus).
Syntax: checkbox.onBlur="myJavaScriptCode"
onClick Event handler
This event handler executes some specified JavaScript code on the occurrence
of a Click event (when the Checkbox object is clicked).
Syntax: checkbox.onClick="myJavaScriptCode"
onFocus Event handler
This event handler executes some specified JavaScript code on the occurrence
of a Focus event (when the Checkbox object receives focus).
Syntax: checkbox.onFocus="myJavaScriptCode"
|