Pagination with selected check boxes. Checkboxes will only work on current pagination page. jQuery datatables

I'm using the jquery datatables plugin.

I have just a straight html table layout for it.

Here is my code for submit (just temp).


And my javascript to map the checkboxes to an array.

function test() {
        var values = $('input:checkbox:checked.chkbox').map(function () {
            return this.value;
        }).get();
        console.log(values);
    }

Here is the datatables code

 $(document).ready(function() {  

    var selected;
    var selectedOutput = '#selectedOutput';
    var template = 'selectedTemplate';
    var submitButton = '#submitButton'

    var  dTable = $('#contactsTable').dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",
        "bPaginate": true,
        "bLengthChange": true,
        "bFilter": true,
        "bSort": false,
        "bInfo": true,
        "bAutoWidth": false,
        "bProcessing": true,
        "aoColumns": [
            {"bVisible": false }, //keep the id invisble    
            null,
            null,     
            null,
            null,
            null,
            null,
            null,
            null,
            null
        ]
    });     

The problem is, I can't do a checkbox selection across a page. The table has mutiple pages to it. If I click submit, it only submits the array of checkboxes for the current page I am on.

I hope this is clear enough. I'm not sure what is happening. Thanks for any help.

8
задан Andrew Whitaker 17 May 2011 в 03:36
поделиться
Id Email Name Phone City State Arrival Departure Inserted Check
301 email address Test July 14 2011 July 23 2011 April 12 2011 07:05
300 email Test September 02 2011 September 10 2011 April 11 2011 12:01