How to handle the serverside response in datatable + ajax call ?
How to handle the serverside response in datatable + ajax call ?
nivedita
Posts: 4Questions: 2Answers: 0
How to handle the server-side response in data-table + ajax call ?
$('#country').dataTable({
"language": {
"zeroRecords": "",
"emptyTable": "No Data Available",
"loadingRecords": "",
"processing": "Processing ",
},
"ajax": {
"url": serviceURL,
"type": "POST",
"contentType": 'application/json',
"dataType":"json",
"data" : function ( d ) {
return JSON.stringify(request)
},
},
"aoColumnDefs" : [ {
"mData": "location"
},
{
"mData": "date"
}]
});
By default it is loading the data which is comes from server side , thats is Json, in some case i used to get exception from server side , in that scenario how to handle the application exception in success call back functionality ? or
How to handle the customize message for "emptyTable" ?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
Hi,
The forum rules request that you don't post duplicates and that you provide a link to the page showing the issue so it can be debugged. Please can you follow these rules? For example we'd need to know what the server is returning.
Thanks,
Allan