开发者

"Object doesn't support this property or method" in IE8 and IE7

开发者 https://www.devze.com 2023-03-18 07:10 出处:网络
I keep getting this error: Object doesn\'t support this property or method whenever I run my code in IE7 and IE8.This is what code its stopping on:

I keep getting this error:

Object doesn't support this property or method

whenever I run my code in IE7 and IE8. This is what code its stopping on:

_renderUploadTemplate: function(files){
    var that = this;
    return $.tmpl(
        this开发者_运维问答.options.uploadTemplate,
        $.map(files, function(file){
            return that._uploadTemplateHelper(file);
        }
    )
}

I am using jQuery-File-Upload by BlueImp. Here is the link to the source files: https://github.com/blueimp/jQuery-File-Upload.

this happens whenever I try to upload something, seems to work ok in other browsers.


Try to put this code in your document ready. Sometimes older versions of IE don't initialize things correctly.


_renderUploadTemplate: function(files){
    var that = this;
    return $.tmpl(
        this.options.uploadTemplate,
        $.map(files, function(file){
            return that._uploadTemplateHelper(file);
        }); //right here
    )
}

I think you're missing a parentheses.

0

精彩评论

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