No data in IE7 and IE8
No data in IE7 and IE8
jeffouille
Posts: 5Questions: 0Answers: 0
Hello all !
I've managed to build a huge datatables (about 35 columns) with serverside process.
Everything works great in safary, firefox, chrome etc..
but in IE, I still have a warning about the number of columns.
I've made a search on the forum but my json is valid (with jsonlite)... so what can I do, now ???
Thanks for your help.
Here is the table http://muriel.deleury.fr/espace-client/table-de-composition-des-aliments/
I've managed to build a huge datatables (about 35 columns) with serverside process.
Everything works great in safary, firefox, chrome etc..
but in IE, I still have a warning about the number of columns.
I've made a search on the forum but my json is valid (with jsonlite)... so what can I do, now ???
Thanks for your help.
Here is the table http://muriel.deleury.fr/espace-client/table-de-composition-des-aliments/
This discussion has been closed.
Replies
I've faced this problem in IE8 before, you may have to verify that the column qty between your , JSON aaData and the parameter in fnUpdate/fnAddData. IE8 will prompt for any column mismatch.
Yam
I made the verifications :
35 colums in th,
35 data in json
I don't use fnUpdate/fnAddData, just use this code :
[code]
$(document).ready(function() {
oTable =$('#table-aliment-table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../../wp-content/plugins/tablealiments/actions/get_data.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"sPaginationType": "full_numbers",
"bAutoWidth": false,
"bJQueryUI": true,
"iDisplayLength": 25,
"sDom": '<"H"<"selector_family">lfr>t<"F"ip>',
"oLanguage": {
"sProcessing": "Traitement en cours...",
"sLengthMenu": "Afficher _MENU_
[code]{"sEcho":9,"iTotalRecords":"799","iTotalDisplayRecords":"799","aaData":[["Abricot au sirop l\u00e9ger, en conserve","Fruits","283","66.7","81.7","6","7","13","150","13","0.3","0.5","16","0","16","0","1.6","0.08","0","0","0","0","792","0","0.9","3","0.02","0.02","0.4","0.08","0.05","0","2","0","0"],["Abricot, frais","Fruits","181","42.6","86.7","1","8.7","19","305","13","0.5","1.1","9","0","9","0","2.4","0.25","0.02","0.13","0.06","0","1500","0","0.7","6","0.04","0.05","0.6","0.3","0.07","0","6","0","0"],["Abricot, nectar","Jus de fruits","267","62.7","84.8","3.9","5.1","9","120","11","0.4","0.4","14.5","0","14.5","0","0.3","0.08","0.01","0.04","0.02","0","600","0","0.2","5","0.02","0.02","0.26","0.1","0.03","0","2","0","0"],["Abricot, sec, d\u00e9noyaut\u00e9","Fruits","1062","250","30","14","52","131","1520","55","5.2","4","50","0","50","0","10","0.6","0.04","0.26","0.12","0","4700","0","4.5","8","0.01","0.16","3.2","0.7","0.26","0","13","0","0"],["Agneau, c\u00f4telette, cru","Viandes","1106","267","67.5","75","16","170","320","9","2","15","0","0","0","0","0","23","7.72","5.98","0.65","0","0","0","0.15","0","0.13","0.18","4.3","0.5","0.2","1.5","3","0","78"],["Agneau, c\u00f4telette, grill\u00e9","Viandes","976","234","60.6","120","20","177","333","20","2.4","22.6","0","0","0","0","0","16","6.97","5.25","0.65","0","0","0","0.16","0","0.1","0.21","5","0.55","0.2","1.7","3","0","83"],["Agneau, \u00e9paule, cru","Viandes","1206","291","58","70","16","160","270","10","1.5","16.5","0","0","0","0","0","25","12","9.46","1.16","22","0","0","0.17","0","0.14","0.21","4.7","0.6","0.22","2.2","3","0","76"],["Agneau, \u00e9paule, cuit, r\u00f4ti","Viandes","1175","283","53","68","21","172","265","10","1.8","21","0","0","0","0","0","22.1","11.7","9.1","1.1","0","0","0","0.12","0","0.12","0.21","5","0.6","0.17","2.5","3","0","91"],["Agneau, \u00e9paule, maigre, cru","Viandes","773","186","68","70","19","170","270","10","2","18.7","0","0","0","0","0","12.3","5.9","4.66","0.57","0","0","0","0.15","0","0.16","0.2","4.7","0.5","0.2","2","3","0","70"],["Agneau, \u00e9paule, maigre, r\u00f4ti","Viandes","812","194","65","70","22","188","278","11","1.9","22.3","0","0","0","0","0","11.7","5.46","4.24","0.52","0","0","0","0.1","0","0.13","0.24","6","0.7","0.19","2.6","4","0","72"]]}[/code]
You may try to use $.each to extract the data from your JSON message and check the length of the data array, this problem should be derived from the column qty mismatch. There may be some problem on parsing the double quot which lead to qty mismatch.
Yam
[code]
"aoColumns": [
{ "sWidth": "100px", "sClass": "informations" },...,{ "sWidth": "10px", "bSearchable": false, "sClass": "alcool" }, ]
[/code]
Allan
I was so concentrate on the json file that I forgot to verify the other paramaters...
Fix, everything works great in IE....