onerror event
Raised when there is an error that prevents the completion of the cross-domain request.
![]() |
Syntax
| HTML Attribute | <element onerror = "handler(event)"> |
|---|---|
| attachEvent Method | object.attachEvent("onerror", handler) |
Event information
| Synchronous | No |
|---|---|
| Bubbles | No |
| Cancelable | No |
Event handler parameters
This method has no parameters.
Standards information
There are no standards that apply here.
Remarks
The document can respond to the error, but there is no way to determine the cause or nature of the error.
The onerror event does not occur when the ontimeout event occurs.
To invoke this event, do one of the following:
- Cannot invoke. The onerror event occurs when the request could not be completed because of an error.
Examples
Setting the onerror property.
<script type="text/javascript"> function err() { alert("XDR onerror"); } ... xdr.onerror = err;
See also
- XDomainRequest
- Reference
- onload
- onprogress
- Conceptual
- XMLHttpRequest Enhancements in Internet Explorer 8
Show:
