Advertisement
Guest User

Ajax Table View

a guest
Aug 28th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. var table;
  2.  
  3. $(document).ready(function() {
  4. //datatables
  5. table = $('#table').DataTable({
  6. "paging" : false,
  7. "info": false,
  8. "searching": false,
  9. "processing": true, //Feature control the processing indicator.
  10. "serverSide": true, //Feature control DataTables'
  11.  
  12. // Load data for the table's content from an Ajax source
  13. "ajax": {
  14. "url": "<?php echo site_url('pengadaan/ajax_list')?>",
  15. "type": "POST",
  16. data:function(d){
  17. d.kode = $("#kode").val();
  18. }
  19.  
  20. },
  21.  
  22.  
  23. //Set column definition initialisation properties.
  24. "columnDefs": [
  25. {
  26. "targets": [ 0 ], //last column
  27. "orderable": false, //set not orderable
  28. },
  29. {
  30. "targets": [ 1 ], //last column
  31. "orderable": false, //set not orderable
  32. "visible": false,
  33. },
  34. ],
  35.  
  36. });
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement