Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Alert Original Error Msg In AJAX

$
0
0

I have config as below:

    $.fn.dataTable.ext.errMode = 'none';
    
    $('#example')
            .on( 'error.dt', function ( e, settings, techNote, message ) {
                console.log(message);
            } )
            .DataTable();

The ajax result is

    {
    ...
    data: null,
    error: 'Parameter Not Right'
    ...
    }

However The message example is:
DataTables warning: table id=zdataTable - Parameter Not Right
My goal is to alert the original error mesage in ajax without "DataTables warning: table id=zdataTable -" profix. Is there any path to do that?

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


Viewing all articles
Browse latest Browse all 2364

Trending Articles