"Object doesn't support this property or method" in IE8 and IE7
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.
精彩评论