vandyahmad24

Untitled

Jan 13th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. setTimeout(function() {
  2. $("#get_data").trigger('click');
  3. },10);
  4.  
  5. $("#get_data").click(function(){
  6. var url = "{{route('get-some-data')}}"
  7. // $('#getData').DataTable().clear().destroy();
  8. $.ajax({
  9. type: "get",
  10. url: url,
  11. dataType: "json",
  12. success:function(data){
  13. Swal.fire({
  14. type: 'success',
  15. title: 'Has been Updated',
  16. text: data.message.id,
  17. }).then(function() {
  18. var VendorClient = $("#tAccount").DataTable({
  19. lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
  20. processing: true,
  21. serverSide: false,
  22. ajax: "{{route('some-url-response')}}",
  23. columns: [
  24. {
  25. data: "fullname",
  26. name: "fullname",
  27. orderable:false
  28. },
  29. {
  30. data: "name",
  31. name: "name",
  32. orderable:false
  33. },
  34. {
  35. data: "month",
  36. name: "month",
  37. orderable:false
  38. }
  39. ]
  40. });
  41. });
  42. }
  43. });
  44. });
Advertisement
Add Comment
Please, Sign In to add comment