fnDrawCallback called again and again

fnDrawCallback called again and again

liasonsamliasonsam Posts: 2Questions: 0Answers: 0
edited February 2014 in General
I am trying to reload the page instead of redrawing the table due to some issues.

[code]"fnDrawCallback": function( oSettings ) {
location.reload();
}[/code]

But the above code leads to infinite page reload. How can I prevent a redraw and use page load everytime?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    fnDrawCallback is called when DataTables draws a page. A draw happens during its startup, so yes, that would cause a page reload immediately if you are initialising the table on page load.

    I don't really understand the intention here I'm afraid. You want to reload the whole page on each sort, filter etc? Do you have some logic that will display the table in the correct order, filtered etc? If so, why the need for DataTables?

    Allan
This discussion has been closed.