Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

DataTables not loading data from JSON

$
0
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:
<table id="table">
   <thead>
      <tr>
         <th>ip</th>
      </tr>
  </thead>
    <tbody>
    </tbody>
</table>

JS:

	
<script>
	$(document).ready(function() {
           $('#table').dataTable( {
              "sAjaxDataProp": "", 
              "sAjaxSource": 'http://date.jsontest.com/?service=ip',
              "aoColumns":
                { "mData": "ip" }
           } );
       } );
</script>

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

Viewing all articles
Browse latest Browse all 1816

Trending Articles