Archived from the Transloadit support forum. Originally posted on December 1, 2010; details may be outdated, see our docs for current behavior. Original thread
I have a onCancel and onError function I want to share between several .transloadit() handlers. However, inside the shared functions, I don’t have a context of what form has triggered the function.
A simplified example:
var onErrorHandler = function() {
// what form triggered the error?
};
$('form').transloadit({ ..., onError: onErrorHandler });