hey all.. i have a data table..but it can't select one row after click the row.. can you tell me where the mistake??
oTable = $("#datalist").dataTable({
"bRetrieve" : true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": 'showlist.php',
"fnServerData": function (sSource,aoData,fnCallback){
aoData.push({"name":"line","value":$("#showline").val()});
aoData.push({"name":"model","value":$("#showmodel").val()});
aoData.push({"name":"serial","value":$("#serial").val()});
aoData.push({"name":"NIK","value":$("#showNIK").val()});
$.ajax({
"dataType":'json',
"type":'POST',
"url":sSource,
"data":aoData,
"success":function(json){
fnCallback(json);
}
});
},
"aaSorting" : [[1,"desc"]],
"aoColumns" : [
/*Line*/ null,
/*Model*/ null,
/*Serial*/null,
/*NIK*/ null
]
});
}else{
oTable.fnDraw();
}
});
function fnGetSelected( oTableLocal ) {
var aReturn = new Array();
var aTrs = oTableLocal.fnGetNodes();
for ( var i=0 ; i<aTrs.length ; i++ )
{
if ( $(aTrs[i]).hasClass('row_selected') )
{
aReturn.push( aTrs[i] );
}
}
return aReturn;
}