DataTables not loading data from JSON
DataTables not loading data from JSON
rmbau21
Posts: 1Questions: 0Answers: 0
Hello,
Im trying to make DataTables load this json : http://date.jsontest.com/?service=ip.
I want it to show a table, with one colum and a item with my ip, so this is what ive done.
HTML:
[code]
ip
[/code]
JS:
[code]
$(document).ready(function() {
$('#table').dataTable( {
"sAjaxDataProp": "",
"sAjaxSource": 'http://date.jsontest.com/?service=ip',
"aoColumns":
{ "mData": "ip" }
} );
} );
[/code]
By doing this, it generates the table, with a colum called ip, but i dont get any entries, it just says "No data available in table"
I dont get any errors in the console,
Any suggestions?
Thanks
Im trying to make DataTables load this json : http://date.jsontest.com/?service=ip.
I want it to show a table, with one colum and a item with my ip, so this is what ive done.
HTML:
[code]
ip
[/code]
JS:
[code]
$(document).ready(function() {
$('#table').dataTable( {
"sAjaxDataProp": "",
"sAjaxSource": 'http://date.jsontest.com/?service=ip',
"aoColumns":
{ "mData": "ip" }
} );
} );
[/code]
By doing this, it generates the table, with a colum called ip, but i dont get any entries, it just says "No data available in table"
I dont get any errors in the console,
Any suggestions?
Thanks
This discussion has been closed.