i am getting empty Rows on search, but the no of rows are correct...
i am getting empty Rows on search, but the no of rows are correct...
jay balu
Posts: 4Questions: 1Answers: 0
hi,
please go to this url "precisionaerocomponents.com/precision_aero/index.php" and search with "01" on "Part Number" input box, you will get about "727 " matching rows but the values are empty, but the data base has the values
please help me in this, below is the function i am using.
function searchDataTable(){
var part_number = $('#part_number').val();
var description = $('#description').val();
var manufacture = $('#manufacture').val();
$('#capabilities').removeClass('hide');
$('#capabilities').dataTable().fnDestroy();
$('#capabilities').DataTable({
iDisplayLength: 15,
bProcessing: true,
bServerSide: true,
searching: false,
language: {
"zeroRecords": "<center style='color:red;'>Sorry, no results found based on your search criteria</center>"
},
sAjaxSource: "<?php echo base_url() ?>account/signin/getCapabilities",
"fnServerParams": function (aoData) {
aoData.push( { "name": "part_number", "value": part_number});
aoData.push( { "name": "description", "value": description});
aoData.push( { "name": "manufacture", "value": manufacture});
},
aLengthMenu: [
[15, 20, 25, 50, 100, -1],
[15, 20, 25, 50, 100, "All"] // change per page values here
],
aoColumns: [
null,
null,
null,
]
});
}
This discussion has been closed.
Answers
Please let me know what was going wrong
Take a look at the Network tab of the Browser's developer tools. You will see these parameters sent in the search request:
The response status code is 200 but there is no response data. The problem seems to be in your server script. I would start debugging there to see why its not returning data.
Kevin
please have a look at the attached file.. status code is 200 as you said
Correct, but there is no response data.
Again you need to debug your server script to see why its not returning data.
Kevin
i can see the response its all null
Hi @jay balu ,
If the server is sending back those
null
values, then I would suggest debugging that server side script. It's obviously reading the table OK, since the row count is correct, but there's going to be something wrong in that script in how it packages up that data.Cheers,
Colin