Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35273

Input values

$
0
0

Im will try be more clear. Im really novice.

How can i get the updated value from inputs after change it?

http://live.datatables.net/vogarad/1/edit

Thanks

MM

$(document).ready(function(){

    var dataSet = [
    
    ["A", 1, 2, 3, 4, '<input type="text" id="in1" name="in1" value=50 "/>', '<input type="checkbox" id="ck1" name="ck1" checked="checked" />'],
            
    ["B", 5, 6, 7, 8, '<input type="text" id="in2" name="in2" value=10 "/>', '<input type="checkbox" id="ck2" name="ck2" checked="checked" />'],
        
    ["C", 1, 3, 6, 8, '<input type="text" id="in3" name="in3" value=5 "/>', '<input type="checkbox" id="ck3" name="ck3" checked="checked" />']
        
    ];

    $('#place').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>');
 
    var oTable = $('#example').dataTable({
        "data": dataSet,
        "columns": [
            { "title": "TYPE" },
            { "title": "C1" },
            { "title": "C2" },
            { "title": "C3" },
            { "title": "C4" },
            { "title": "C5" },
            { "title": "YES" }
            ]
        
    });   
    
    $("#dump").click( function(){
        var ckdata = $('input:checked', oTable.fnGetData() );
        console.log(ckdata);
    });

});

Viewing all articles
Browse latest Browse all 35273

Trending Articles