Hi Brian,
I assume you mean in a JSON-RPC service call, or some other Ajax
request. The service methods all take an options object as their last
parameter whereby you can specify a number of options for context and
callback. The onFailure callback is the one you want.
Here's a breakdown of what is allowed. Most of these are implemented
for you when you are using a JSON-RPC service call:
RequestOptions = {
// HTTP Options
async : bool,
method : string,
headers : Dictionary<string, string>,
timeout : number,
params : string,
// callbacks
onCreate : function(XMLHttpRequest, context){},
onSuccess : function(XMLHttpRequest, context){},
onFailure : function(XMLHttpRequest, context, Error){},
onTimeout : function(XMLHttpRequest, context, Error){},
onComplete : function(XMLHttpRequest, context){},
// callback context
context : object
};
smm