ie7 and ie8 Unable to get value of the property
I am trying to build a table using jQuery Datatables. Everything works on all browsers except ie7 and ie8.
Here is the error:
SCRIPT5007: Unable to get value of the property 'sName': object is null or undefined
Here is the JS code:
var jsonData = [];
for (var i = 0; i < docs.length; i++) {
var obj = docs[i];
var row = [];
row.push('<input type="checkbox" class="article_checkbox" />');
for (var j = 1; j < columns.length; j++) {
var value = obj[col开发者_如何转开发umns[j].sName];
console.log(value);
row.push(value);
}
jsonData.push(row);
};
My only thought is that the JSON response had a loose comma somewhere but I ran it through jsonlint and it came back valid.
Any ideas on this nasty lil' thing?
Thanks!
I had a similar problem and the issue was that I had an additional ,
in the end of my array.
All of the sName definitions had to be wrapped in double quotes : )
精彩评论