multiple search boxes when pressing back or forward in the browser
multiple search boxes when pressing back or forward in the browser
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
multiple search boxes when pressing back or forward in the browser
When back or forward button is pressed additional search box and pagination shows up
when back or forward button is pressed again additional search box and pagination shows up again and on and on.
I think it is adding a new table on top of the older table ...
Is there way to correct this problem ?
Thank you!
here is the code
'''<script>
$(document).ready(function () {
$('table.display').DataTable({
destroy: true,
language: {
// this is for the table -- changing languages per page
lengthMenu: '페이지당 _MENU_ 표시',
zeroRecords: '찾을 수 없음 - 죄송합니다',
info: '_PAGES_ 페이지 중 _PAGE_ 표시 ',
infoEmpty: '기록이 없음',
infoFiltered: '(총 _MAX_ 기록에서 검색)',
thousands: ',',
search: "검색:",
"paginate": {
"first": "첫페이지",
"last": "마지막",
"next": "다음",
"previous": "이전",
},
},
"order": [],
// changing the values in the dropdown menu
"lengthMenu": [ [10, 15, 20, 25, 50, 75, 100, -1], [10, 15, 20, 25, 50, 75, 100, "All"] ],
"pageLength": 15,
});
// styling the pagination button size
$('.dataTables_paginate').addClass('pagination-sm');
});
</script>
Answers
I remember seeing other forum posts with a similar description. I don't remember the details but I believe the problem is due to inserting a -
div
for the -table
, not clearing thediv
and reinserting the samediv
. So no one table is overlaid over the other. It would take some debugging of your page to find the issue. If you need help with this please post a link to your page or a test case replicating the issue so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
thank you for the reply I will try debugging with your suggestions