Displaying server data pulled from a Form submission
Displaying server data pulled from a Form submission
The use case is simply to capture few search params from user, submit them to the server that query/filter based on those params and send JSON data back to the datatables to display.
Most examples I've come across use sAjaxSource, which kind of behaves different to my classic use case. Are there any examples that I'm missing out?
Thanks in advance!
Most examples I've come across use sAjaxSource, which kind of behaves different to my classic use case. Are there any examples that I'm missing out?
Thanks in advance!
This discussion has been closed.
Replies
Thanks
Here's how my code is looking like after engaging the datatable rendering to my Form submission event. Apparently this works ok and I can trace the JSON is getting feteched OK from server side but the issue is that I don't see it being displayed on my datatable.
[code]
$(document).ready(function() {
$('#form_id').submit( function() {
var sData = $('input').serialize();
$('#table_id').dataTable( {
"bProcessing": false,
"bServerSide": true,
"sAjaxSource": "query.do?"+sData,
"aoColumns": [
{ "mData": "busId", "bSortable": false },
{ "mData": "sourceSystem", "bSortable": false },
{ "mData": "receiveTime", "bSortable": false,
"mRender": function(data, type, full) {
return new Date(data).toUTCString();
}
},
{ "mData": "recipients", "bSortable": false},
{ "mData": "validationStatus", "bSortable": false },
{ "mData": "routingStatus", "bSortable": false },
{ "mData": "messageId", "bSortable": false }
],
"fnServerData": fnDataTablesPipeline,
"sDom": "rtp",
"sPaginationType": "full_numbers",
"iDisplayLength": 20
} );
return false; // cancel the form submit action as we do this via ajax
} );
} );
[/code]
What's is the average response time on this forum? It seems to be taking 30+hrs without a single reply!