Testing data before

Testing data before

blargblarg Posts: 1Questions: 0Answers: 0

Hi All,
So I get some data using a pretty standard definition:

$('#overview_all').dataTable( {
    "ajax": "./data.php?view_name=vt_all_requests_by_service&system_id="+system_id,
    "paging":   false,
    "ordering": false,
    "info":     false,
    "filter":     false //this is actually "search"
} );

However, sometimes no data is returned, in which case the resulting "data" object contains "false".
How can I test for this? DT fails rather hideously when it receives this, giving all the usual alerts. What I want to do is intercept the data before DT gets it and then stop DT from trying to do anything if there's no data.

Any thoughts? Thanks.

This discussion has been closed.