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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.