fnDraw() and return value

fnDraw() and return value

mathiemathie Posts: 36Questions: 0Answers: 0
edited July 2011 in DataTables 1.8
I know from the documentation, this function does not return anything (void). Is there a way for fnDraw() to return boolean? (true if data was reloaded and false if data is not available). Or is there other way to know this?

I have an error handling scenario with server-side data source that sends 403 when session times out. Visitors who leave their browser idle will keep reloading the 403 page. Better yet, the client-side script should stop reloading if it determines it cannot fetch the data.

Thanks.
Son

Replies

  • allanallan Posts: 61,627Questions: 1Answers: 10,090 Site admin
    What you would need to do is use fnServerData to customise the Ajax call to the server - you can use the error handler from jQuery to check for the 403 error.

    Allan
This discussion has been closed.