Hi,
I am new to JQuery and I am trying to get datatables to make an AJAX call to an Oracle database. The AJAX call works fine and returns data that passes JsonLint as a good response, but datatables still returns a json error. I think I'm missing something in initializing datatables but nothing I've tried has worked. I started with the demo page and just modified it a little.
Here is what the call returns and the datatables code:
{"sEcho":1,"iTotalRecords":"14563","iTotalDisplayRecords":"25","aaData":[["7260"],["924"],["7510"],["2305"],["616"],["7260"],["932"],["941"],["7141"],["7141"],["3402"],["975"],["944"],["9114"],["669"],["6147"],["611"],["981"],["2440"],["973"],["3009"],["614"],["973"],["013"],["927"]]}
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable({
"bFilter": false,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": 'datatables_oracle_ajax.php'
});
} );
</script>
<table id="example" class="display" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th>Code</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th>Code</th>
</tr>
</tfoot>
</table>
This returns "json data from server could not be parsed". I've tried adding options like aocolumdefs but nothing has worked so far.
Any ideas?
Thanks for any help.
Bob Z.