Accessing the ajax server response object
Accessing the ajax server response object
[code]
var wTable = $('#workflowsTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "/api/jobs/workflows",
"aoColumns": [
{ "mDataProp": "status" },
{ "mDataProp": "label" },
{ "mDataProp": "jobs_complete" },
{ "mDataProp": "workflow" },
{ "mDataProp": "jobs_failed" },
{ "mDataProp": "jobs_waiting" },
{ "mDataProp": "start" },
{ "mDataProp": "end" }
]
});
[/code]
Here is the extent of my code and my table is working nicely. But i'd like to access the return json object somehow.. similar to what the jquery $.ajax() function does. I would like to perhaps do some logic before the data actually populates the table. For eg if a property is empty than display some custom piece of text. Is this possible?
Thanks!
var wTable = $('#workflowsTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "/api/jobs/workflows",
"aoColumns": [
{ "mDataProp": "status" },
{ "mDataProp": "label" },
{ "mDataProp": "jobs_complete" },
{ "mDataProp": "workflow" },
{ "mDataProp": "jobs_failed" },
{ "mDataProp": "jobs_waiting" },
{ "mDataProp": "start" },
{ "mDataProp": "end" }
]
});
[/code]
Here is the extent of my code and my table is working nicely. But i'd like to access the return json object somehow.. similar to what the jquery $.ajax() function does. I would like to perhaps do some logic before the data actually populates the table. For eg if a property is empty than display some custom piece of text. Is this possible?
Thanks!
This discussion has been closed.
Replies
Allan