From: Banana Date: Sat, 13 Aug 2011 09:34:15 +0000 (+0200) Subject: error function on error X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=4fbad9b6ada9890cbf87c3570e8f1335226ab87e;p=klimbim.git error function on error --- diff --git a/javascript/mif-tree/mif.tree_for-mt-1.3.2.js b/javascript/mif-tree/mif.tree_for-mt-1.3.2.js index a02e8e4..16515ce 100644 --- a/javascript/mif-tree/mif.tree_for-mt-1.3.2.js +++ b/javascript/mif-tree/mif.tree_for-mt-1.3.2.js @@ -1001,8 +1001,16 @@ Mif.Tree.implement({ isSuccess: Function.from(true), secure: true, onSuccess: success, + onError: errorFunc, method: 'get' }, this.loadOptions()), options); + + function errorFunc(text,error) { + alert(text); + alert(error); + return false; + } + if(options.json) return success(options.json); new Request.JSON(options).send(); return this; @@ -1031,8 +1039,16 @@ Mif.Tree.Node.implement({ isSuccess: Function.from(true), secure: true, onSuccess: success, + onError: errorFunc, method: 'get' }, this.tree.loadOptions(this)), this.loadOptions), options); + + function errorFunc(text,error) { + alert(text); + alert(error); + return false; + } + if(options.json) return success(options.json); new Request.JSON(options).send(); return this;