Button.handleEvent()

JavaScript 1.2+ Nav4+ Syntax

document.form.button.handleEvent(event)

Description

The handleEvent() method provides a way to invoke a button's event handler, even though the event was not triggered by the user. The argument associated with this method is listed in Table 7.6.

Table 7.6. Argument Associated with the handleEvent() Method
Argument Description
event An event object to be handled

Example

The code in Listing 7.26 provides information about a car that is for sale. By choosing one of the buttons labeled Doors, Engine, or Transmission, the related information is entered into the text boxes. The text boxes can be cleared by clicking the Clear All Info button. Unlike the other buttons, the Show All Info button ...

Get Pure JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.