Welcome Guest, Not a member yet? Register   Sign In
How to use a datepicker filter in codeIgniter ?
#6

(02-24-2019, 07:58 PM)php_rocs Wrote: @firas,

If the DataTables plugin disappears then something is configured wrong.  What was the error messages?

there was no error message, it just shows all data from the database without the DataTables plugin, I tried using another method using jquery search filter like this one : 

Code:
<script>
function myFunction2() {
 var input, filter, table, tr, td, i, th;
 input = document.getElementById("search");
 filter = input.value.toUpperCase();
 table = document.getElementById("myTable1");
 tr = table.getElementsByTagName("tr");
 for (i = 0; i < tr.length; i++) {
   td = tr[i].getElementsByTagName("td")[1];
   if (td) {
     if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
       tr[i].style.display = "";
     } else {
       tr[i].style.display = "none";
     }
   }      
 }
}
</script>
 
but it only searches on the first page without searching on the page of my pagination, like if my data that was on 2015 on page 5, and when I search 2015, it only search on the first page.
Reply


Messages In This Thread
RE: How to use a datepicker filter in codeIgniter ? - by firas - 02-24-2019, 08:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB