get id from checkbox

get id from checkbox

iMootjeiMootje Posts: 1Questions: 1Answers: 0

Hello,
I would like information from the selectbox..

how can i do this? to further develop it in PHP

MY code now:

$( document ).ready(function() {

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    $.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});

var table = $('table.table').DataTable( {
    columnDefs: [
        {
            searchable: false,
            orderable: false,
            targets: 0,
            'targets': 0,
            'checkboxes': {
           'selectRow': true  
           }              
        },
    ],



    "ajax": "data.php",
    "bPaginate":true,
    "bProcessing": true,
    "pageLength": 15,
    "lengthChange": false,
    "bInfo" : false,
    "responsive" : true,
    'stateSave': true,  
   'stateSave': true,
  'select': 'multi',
  'order': [[1, 'asc']],       
    "columns": [
        { mData: 'CHECKBOX' } ,
        { mData: 'REFERENCE' },
        { mData: 'TRAVEL_DATETIME' },
        { mData: 'FROM_ADRES' },
        { mData: 'TO_ADRES'},
        { mData: 'STATUS' }
    ]
}); 

$('#myTable1').DataTable() .column(5) .search("Niet toegewezen").draw();    
$('#myTable2').DataTable() .column(5) .search('Toegewezen').draw();
$('#myTable3').DataTable() .column(5) .search('Geaccepteerd & voltooid').draw();
$('#myTable4').DataTable() .column(5) .search('Geannuleerd').draw();
$('#myTable3').DataTable() .column(0) .visible(false);
$('#myTable4').DataTable() .column(0) .visible(false);    
$('.dataTables_filter').hide();


setInterval( function () {
    table.ajax.reload(null, false);
}, 5000 );  


$('#search').on('input', function() {
    table.search($(this).val()).draw();
});

$('#openMenu').on('click', function(e) {
    e.preventDefault();
    $(this).toggleClass('show');
    $('#sidebarMenu').toggle();
});

$('.nav-pills .nav-link').click(function(e) {
    e.preventDefault();
    $('.nav-pills .nav-link').removeClass('active');
    $(this).addClass('active');
    $.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
    var id = $(this).attr('href');
    $('.tab-pane').hide();
    $(id).show();
});

});

Answers

Sign In or Register to comment.