]> 91.132.146.200 Git - klimbim.git/commitdiff
error function on error
authorBanana <jumpin.banana@gmail.com>
Sat, 13 Aug 2011 09:34:15 +0000 (11:34 +0200)
committerBanana <jumpin.banana@gmail.com>
Sat, 13 Aug 2011 09:34:15 +0000 (11:34 +0200)
javascript/mif-tree/mif.tree_for-mt-1.3.2.js

index a02e8e4486b6fdc2a27ef2452d69e94de679b6d6..16515cea53c183754c8f76cd9ebafd72c007d846 100644 (file)
@@ -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;