Documentation Center

loadError

Description

This event will be fired when a document fails to load properly.

Unlike other events which receive an event object, this listener will receive an exception from the underlying loader code. These are usually (but not limited to) IOException or DOMException objects.

You can use this event to catch the failure of a document to load and replace the default dialog with your own dialog or other event handling.

Please note that you must add your event listener for this event before you attempt to load a document, for obvious reasons.

// attach event handler
Editor.addEventListener("loadError", myLoadErrorHandler);

// Event handler to handle the XML file failing to load
function myLoadErrorHandler(evt)
{
   alert("The XML file has failed to load.");
   return false;
}

loadError event