'No data available in table' in IE

'No data available in table' in IE

vlowevlowe Posts: 2Questions: 0Answers: 0
edited July 2012 in DataTables 1.9
I have that problem where you get your code working perfectly in chrome and then decide to check it in other browsers and you find a problem :(

I have a pop up window which contains a datatable, the data is showing in firefox and chrome perfectly.

In IE (I have IE 9) i get no data and the message 'No data available in table'.

If i do
[code]
console.log(historyArray);
[/code]
I do get the data in the console.

Here is the datatable code, how can i resolve the IE issue?
[code]
myTable = $('#report').dataTable({
"aaData": historyArray,
"aoColumns": [{
"mDataProp": "User"
}, {
"mDataProp": "Timestamp"
}, {
"mDataProp": "Latitude"
}, {
"mDataProp": "Longitude"
}, {
"mDataProp": "Address"
}],
"bPaginate": false,
"bJQueryUI": true,
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"sSwfPath": "swf/copy_csv_xls_pdf.swf",
"aButtons": ["copy", "csv", "xls", "pdf"]
},
"fnInitComplete": function () {
addClasses();
}
});
[/code]

Replies

  • vlowevlowe Posts: 2Questions: 0Answers: 0
    edited July 2012
    Fixed it..

    For some reason datatables didn't want to use the array fetched by window.opener even though it was received ok.

    I fixed it by creating a new array and pushing the values into it. Then give the newArray data to datatables.

    [code]
    var newArray = [];
    var historyArray = window.opener.historyArray;

    for (var key in historyArray) {
    newArray.push(historyArray[key])
    }
    [/code]
This discussion has been closed.