Event.ERROR

JavaScript 1.1+, JScript 3.0+ Nav3+, IE 4+, Opera3+ Syntax

Event.ERROR

Description

The ERROR property of the Event object is used by windows and images to indicate any errors that occurred during the loading of the Web page.

Example

Listing 7.223 shows an example of how ERROR events can be handled. When an ERROR event is captured, it is passed to the handle() function, which informs the user of the error.

Listing 7.223 Accessing the ERROR Property
 <html> <head> <title>Using the Event.ERROR</title> </head> <body> <script language = "JavaScript"> <!--Hide // sets up the window to capture ERROR event window.captureEvents(Event.ERROR); // function that handles the specific event. The evnt parameter refers to // the event object. ...

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.