Provide my own function to display error alerts

Provide my own function to display error alerts

capitalbrandscapitalbrands Posts: 3Questions: 2Answers: 0

When the DataTable.ext.errMode setting is set to 'alert', it would be really nice if I could optionally provide my own function to call in order to display the message to the user instead of DataTables always using JavaScript's built-in alert( msg ); function.

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    As of 1.10.5 you can do this :-). Set $.fn.dataTable.ext.errMode to be your function and DataTables will execute that rather than calling alert or throwing an error (the two built in options).

    Allan

This discussion has been closed.