How to solve this problem "http://datatables.net/tn/3" (if you want to datatable display)

How to solve this problem "http://datatables.net/tn/3" (if you want to datatable display)

ClearClear Posts: 1Questions: 1Answers: 0
edited June 2019 in Free community support
<script>
$(function() {
    var table = $('#datatable').DataTable({
        paging: false,
        retrieve: true,
        order: [
            [1, 'ASC']
        ]
    });
});

$(function() {
    var table = $('#datatable').DataTable({
        processing: true,
        serverSide: true,
        scrollY: 200,
        scrollX: true,
        searching: false,
        ajax: '{{ route('purchase_orders.datatable') }}',
        columns: [
            { data: 'po_date', name: 'p.date' },
            { data: 'po_code', name: 'p.code' },
            { data: 'sup_name', name: 'sup.name' },
            { data: 'ppns', name: 'ppns', searchable: false },
            { data: 'pt_name', name: 'pt.name' },
            { data: 'po_due_date', name: 'po_due_date' },
            { data: 'po_down_payment', name: 'p.down_payment' },
            { data: 'po_total', name: 'po_total' },
            { data: 'po_created_at', name: 'p.created_at' },
            { data: 'creator_name', name: 'usr.name' },
            { data: 'po_status', name: 'p.status' },
            { data: 'actions', name: 'actions', searchable: false }
            ],
            order: [8, 'desc'],
        });

        $('.table-scrollable').freezeTable({
             scrollable: true,
        });

        $('.search-input-select').on('change', function(){// for select value
            var i =$(this).attr('data-column');
            var v =$(this).val();
            table.columns(i).search(v).draw();
        });
    });
</script>

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Have you followed the URL in the error message and checked each of the recommendations there?

This discussion has been closed.