$('#table_print').DataTable({
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$( ".print" ).click(function() {
var rel = $(this).attr('rel');
var s = $("input[name='start"+rel+"']").val();
var e = $("input[name='end"+rel+"']").val();
var r = $("input[name='round"+rel+"']").val();
var n = $("input[name='nameid"+rel+"']").val();
console.log("rel:"+rel+"/start:"+s+"/end:"+e+"/round:"+r+"/"+n+"");
if ( $.trim( s ) === '' || $.trim( e ) === '' || $.trim( r ) === '' || $.trim( n ) === '' ){
alert('Error');
return false;
}else{
var url = "<?php echo site_url('code/export'); ?>/"+s+"/"+e+"/"+r+"/"+n+"";
window.open(url, '_blank');
}
});
}
});