Return Additional Data in JSON and Access in Callback
Return Additional Data in JSON and Access in Callback
we are using: jQuery.fn.dataTableExt.oApi.fnDataTablesPipeline (https://datatables.net/examples/server_side/pipeline.html) to retrieve data from the server.
Is there a way to return additional data to be used in a callback?
[code]
//from the server
$jsonDataArray = array(
'sEcho' => $sEcho
'aaData' => $data,
'additionalKey' => 'someValue'
);
$jsonData = json_encode($jsonDataArray);
[/code]
In the fnDrawCallback (or some other callback), is there a way to access 'additionalKey'? I was unable find that key in oSettings or any other value passed into the various callbacks.
The answer provided in links below don't quite answer the question, since they aren't using pipelining to retrieve information:
http://stackoverflow.com/questions/6090260/jquery-datatables-return-additional-information-from-server
http://datatables.net/forums/discussion/5854/how-to-returning-morecustom-data-from-server-side-script-and-displaying/p1
Thank you,
Chris
Is there a way to return additional data to be used in a callback?
[code]
//from the server
$jsonDataArray = array(
'sEcho' => $sEcho
'aaData' => $data,
'additionalKey' => 'someValue'
);
$jsonData = json_encode($jsonDataArray);
[/code]
In the fnDrawCallback (or some other callback), is there a way to access 'additionalKey'? I was unable find that key in oSettings or any other value passed into the various callbacks.
The answer provided in links below don't quite answer the question, since they aren't using pipelining to retrieve information:
http://stackoverflow.com/questions/6090260/jquery-datatables-return-additional-information-from-server
http://datatables.net/forums/discussion/5854/how-to-returning-morecustom-data-from-server-side-script-and-displaying/p1
Thank you,
Chris
This discussion has been closed.
Replies
Allan