Loading json data via ajax on IE8 and safari doesnt work.
Loading json data via ajax on IE8 and safari doesnt work.
brohan
Posts: 1Questions: 1Answers: 0
Hello! I cant seem to find a way to get IE8 to load my json data, It works fine on chrome and firefox.
Here is my loading code:
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
$('#example').dataTable( {
"ajax": {
"url": "/data/Data.txt",
"type": "GET",
"contentType": "json"
},
"pageLength": 50,
"language":
{
"url": "//cdn.datatables.net/plug-ins/725b2a2115b/i18n/Swedish.json"
},
"columnDefs":
[
{
"render": function ( data, type, row ) {
var num1 = (row[2]/row[1])*100;
return num1.toFixed(2);
},
"targets": 5
},
{
"render": function ( data, type, row ) {
var num2 = (row[2]*10)/row[5];
return num2.toFixed(2);
},
"targets": 6
},
{
"render": function ( data, type, row ) {
var num3 = ((row[2]*10)/row[5])*((row[2]/row[1])*10);
return num3.toFixed(2);
},
"targets": 7
},
{
"render": function ( data, type, row )
{
return row[5];
},
"targets": 8
}
]
} );
} );
</script>
Also a link to my website: http://proteinperkrona.com/
Regard!
This discussion has been closed.