DataTables 1.10.0 custom error dialogs?

DataTables 1.10.0 custom error dialogs?

kaseykrehbielkaseykrehbiel Posts: 18Questions: 2Answers: 0

I'm looking for a way to override the standard alert error messages and display a custom error dialog instead.

In my datatables markup, I have the "ajax" property and a url and data, and that works wonderfully, but when the AJAX call fails, I'm not sure how to override the standard alert message and display my own instead.

In all of my other AJAX calls, I'm doing something like this:

$.ajax({
// stuff
}).done(function(response) {
// stuff
}).fail(function(e) {
displayCustomErrorDialog('title', 'error message');
})

I'd like to call that custom function anytime an AJAX call from dataTables fails. Can I do that?

This discussion has been closed.