Datatable not rendering data
Datatable not rendering data
ticovisky
Posts: 5Questions: 1Answers: 0
Well,
acujir
I will try to be very short.
I'm working with CI and I have a page that do an Ajax call to load the data on the table.
I'm always getting the parse erro. Here is the debbuging code:acujir.
I already check the json format and is a valid one. The funny thing is when I get the return json with firebug and put on a php page out side de application folder (like assets) and do an echo, it works fine.
So I don't know what to do. Here is the code that loads the table:
<script type="text/javascript">
$(document).ready(function ()
{
var oTable = $("#tabela_nfe").DataTable({
"bProcessing": true,
"bServerSide": true,
"sServerMethod": "POST",
"sAjaxSource": "<?= base_url(); ?>inicio/carrega_nfe",
"bJQueryUI": true,
"bDeferRender": true,
"sPaginationType": "full_numbers",
"iDisplayStart ": 10,
"aoColumns": [
{"sName": "id"},
{"sName": "nome"},
{"sName": "uf"}
]
});
});
</script>
This discussion has been closed.
Answers
Just for the record. I'm working on this for 5 days and I need a solution b/c my boss is a pain in the a**
Some screenshots to help:
This is my response from the ajax: http://prntscr.com/4unv8m (note that if I do a search the ajax return what I searched)
My view: http://prntscr.com/4unvjr
My controller: http://prntscr.com/4unvpn
The page that is called w/ the json: http://prntscr.com/4unvtj
Finally I could resolve!
DONE