Mobile Issue
Mobile Issue
jake.copland
Posts: 1Questions: 1Answers: 0
I am using Chrome browser on Lenovo mobile. I have tested on other mobile platforms also. I have noticed that when I switch between pages, the table will add empty rows to the bottom of the table. Initially on page 1 it is fine. But for every page that is clicked, a new row is added. Please see screenshots.
I am using server side processing.
<script type="text/javascript" language="javascript">
$(document).ready(function() {
var dataTable = $('#view-table').DataTable( {
"fixedHeader": {
"header": false,
"footer": false
},
"autoWidth": true,
"drawCallback": function( settings ) {
$("#view-table").wrap( "<div class='table-responsive'></div>" );
},
"lengthMenu": [[20, 50, 100, 250, 500, -1], [20, 50, 100, 250, 500, "All (Slow)"]],
"iDisplayLength": 20,
"processing": true,
"serverSide": true,
"responsive": true,
"language": {
"processing": "<img src='http://127.0.0.1:8080/ethix/public_html/x/images/ajax-loader.gif'> Processing..",
"searchPlaceholder": "Search records",
"emptyTable": "No data found."
},
"columnDefs": [ {
"targets": [7,8,10,11,12], // column or columns numbers
"orderable": false // set orderable for selected columns
}],
"ajax":{
url :"http://127.0.0.1:8080/ethix/public_html/x/data/process_data.php?page_current=view_data_branch", // json datasource
type: "post", // method , by default get
error: function(){ // error handling
$(".view-table-error").html("");
$("#view-table").append('<tbody class="borrowers-list-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>');
$("#view-table-processing").css("display","none");
}
},
stateSave: true
} );
} );
</script>
This discussion has been closed.