Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object doesn't support this property or method only on IE8

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.

like image 882
manzapanza Avatar asked Dec 26 '22 17:12

manzapanza


1 Answers

Solve it like this.

arg: $.trim($('#ProductAdminIndexList #'+data.id()+' .productId').text())
like image 133
howdy Avatar answered Dec 29 '22 07:12

howdy