[DT 1.5.6] AJAX, still "Loading..."

[DT 1.5.6] AJAX, still "Loading..."

NetJaroNetJaro Posts: 1Questions: 0Answers: 0
edited October 2010 in General
Hi :)

For first - sorry for my english ;)

I have error with DataTables 1.5.6.

update.php
[code]

$(document).ready(function() {
$('#tabela').dataTable(
{
"bProcessing": true,
"bServerSide": true,
"sDom": 'T<"clear">lfrtip',
"sPaginationType": "full_numbers",
"sAjaxSource": "include/table/update_table.php"
}
);
} );

[/code]
update_table.php
[code]
{"sEcho": 1, "iTotalRecords": 209, "iTotalDisplayRecords": 4, "aaData": [ ["230","Tenis","Davydenko-Isner ","08/10/2010 08:30","ABC","1.72","Bet365","10","",""],["231","Tenis","ABC ","08/10/2010 10:00","oABC","1.83","Bet365","10","",""],["232","PN","Anglia U21 - Rumunia U21","08/10/2010 20:30","1","1.44","Bet365","10","",""],["233","PN","qq","08/10/2010 18:00","1","10","Bwin","10","",""]] }
[/code]
It's valid JSON code (by http://www.jsonlint.com/ )

On the update.php I have still "Loading".
But, when I write something to search input - this is work.

No JS errors on the site.

Please, help me :(

Thanks!
Martin.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Martin,

    Is sEcho being passed back as is sent from DataTables? (you need to cast it as an integer for security reasons though!).

    Also iTotalDisplayRecords looks wrong. Unless you have a filter applied, it should be the same as iTotalRecords. http://datatables.net/usage/server-side .

    If that doesn't help, can you link to an example please?

    Allan
This discussion has been closed.