|Property/method value type:||Boolean primitive|
|HTML syntax:||<HTMLTag onError="..."> <IMG onError="...">|
|Argument list:||aHandler||A reference to a function object to handle the event.|
|Supported by objects:||IMG, LINK, OBJECT, SCRIPT, STYLE|
The <IMG onError="..."> tag attribute allows an error during image loading to be handled gracefully.
Error events have a slightly different parameter passing API so although they are events, they are slightly different from the rest of the event model.
The API for the function that is associated with this event should take three parameters.
This event handler cannot be set in HTML using the tag attribute technique apart from when it applies to an <IMG> tag. However, it also applies to windows and frames although there is no tag attribute to connect it to. You can only associate it with a window or frame by using the script-driven property assignment.
Beware of the return values. Returning true from an error handler inhibits the browser form carrying out any further action. This is exactly opposite to the return value from a form element event handler, which requires that a false value be returned to inhibit any further action by the browser.
The range of objects you can register an onError handler with is platform and browser version dependent and you should experiment with your target client base if you plan to use this other than for debugging help.