开发者

Error calling method on NPObject!

开发者 https://www.devze.com 2023-03-21 02:43 出处:网络
Sorry for my English I updated my uploadify to recent version (Uploadify-v2.1.4) and that broked my uploadify:

Sorry for my English I updated my uploadify to recent version (Uploadify-v2.1.4) and that broked my uploadify: I can't upload anything . FireBug console returns this erroe when I'm trying to call "Error calling method on NPObject!".

What am I doing开发者_开发百科 wrong?!

Here's my code: http://pastebin.com/bHeYHxHw

Thanks,

Daniil.


/* Original code */ uploadifyCancel:function(ID) {

                        jQuery(this).each(function() {



                           document.getElementById(jQuery(this).attr('id') + 'Uploader').cancelFileUpload(ID, true, true, false);

                        });

                   },

/*New code */

uploadifyCancel:function(ID){

                jQuery(this).each(function(){

                    document.getElementById(jQuery(this).attr("id")+"Uploader").cancelFileUpload(ID,true,false)

                });

            },

/*Original code */

                           jQuery(this).bind("uploadifyComplete", {

                              'action': settings.onComplete

                              }, function(event, ID, fileObj, response, data) {

                              if (event.data.action(event, ID, fileObj, unescape(response), data) !== false) {

                                   jQuery("#" + jQuery(this).attr('id') + ID).find('.percentage').text(' - Completed');

                                   if (settings.removeCompleted) {

                                       jQuery("#" + jQuery(event.target).attr('id') + ID).fadeOut(250,function() {

                                           jQuery(this).remove()

                                           });

                                 }

                                 jQuery("#" + jQuery(event.target).attr('id') + ID).addClass('completed');

                               }

                           });

/* New code */

jQuery(this).bind("uploadifyProgress", {

                    'action': settings.onProgress,

                    'toDisplay': settings.displayData

                }, function(event, ID, fileObj, data) {

                    if (event.data.action(event, ID, fileObj, data) !== false) {

                        jQuery("#" + jQuery(this).attr('id') + ID + "ProgressBar").animate({

                            'width': data.percentage + '%'

                        },250,function() {

                            if (data.percentage == 100) {

                                jQuery(this).closest('.uploadifyProgress').fadeOut(250,function() {

                                    jQuery(this).remove()

                                });

                            }

                        });

                        if (event.data.toDisplay == 'percentage') displayData = ' - ' + data.percentage + '%';

                        if (event.data.toDisplay == 'speed') displayData = ' - ' + data.speed + 'KB/s';

                        if (event.data.toDisplay == null) displayData = ' ';

                        jQuery("#" + jQuery(this).attr('id') + ID).find('.percentage').text(displayData);

                    }

                });
0

精彩评论

暂无评论...
验证码 换一张
取 消