admin管理员组文章数量:1287789
This code run on Chrome, FF, Safari, IE9 but on IE8 i get this error:
Message: Object doesn't support this property or method Line: 80 Char: 7 Code: 0
and this is what code its stopping on: (line 80 is on "return [" but the developer tool debugger highlights all this code below)
return [
{
title:'Edit',
customClass:'actionEdit',
action:{
type:'getLink',
url:'/admin/products/edit/'+data.id()+''
}
},
{
title:'Attaches',
customClass:'actionAttaches',
action:{
type:'getLink',
url:'/admin/attaches/index/product/'+data.id()+''
}
},
{
title:'Delete',
customClass:'actionDelete',
action:{
type:'postLink',
url:'/admin/products/delete/'+data.id()+'',
confirm:'Are you sure you want to delete %s?',
arg:$('#ProductAdminIndexList #'+data.id()+' .productId').text().trim()
}
}
];
I found others similar cases but i don't know why occur and how can solve this problem.
This code run on Chrome, FF, Safari, IE9 but on IE8 i get this error:
Message: Object doesn't support this property or method Line: 80 Char: 7 Code: 0
and this is what code its stopping on: (line 80 is on "return [" but the developer tool debugger highlights all this code below)
return [
{
title:'Edit',
customClass:'actionEdit',
action:{
type:'getLink',
url:'/admin/products/edit/'+data.id()+''
}
},
{
title:'Attaches',
customClass:'actionAttaches',
action:{
type:'getLink',
url:'/admin/attaches/index/product/'+data.id()+''
}
},
{
title:'Delete',
customClass:'actionDelete',
action:{
type:'postLink',
url:'/admin/products/delete/'+data.id()+'',
confirm:'Are you sure you want to delete %s?',
arg:$('#ProductAdminIndexList #'+data.id()+' .productId').text().trim()
}
}
];
I found others similar cases but i don't know why occur and how can solve this problem.
Share Improve this question asked Sep 19, 2012 at 22:14 manzapanzamanzapanza 6,2454 gold badges42 silver badges50 bronze badges 1-
1
IE8 doesn't support some (non-standard but mon) Javascript methods like
trim
. See here: stackoverflow./a/2308157/1001985 – McGarnagle Commented Sep 19, 2012 at 22:18
2 Answers
Reset to default 8Solve it like this.
arg: $.trim($('#ProductAdminIndexList #'+data.id()+' .productId').text())
I'm almost positive IE8 doesn't have a trim()
method. jQuery however provides an implementation, call it like $.trim()
since it looks like you're already using jQuery.
本文标签: javascriptObject doesn39t support this property or method only on IE8Stack Overflow
版权声明:本文标题:javascript - Object doesn't support this property or method only on IE8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741327168a2372554.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论