Add URL to column data
Add URL to column data
techbeck03
Posts: 1Questions: 0Answers: 0
I'm currently populating my datatable via a server-side php script from a mysql database. I'd like to make certain column data a hyperlink to another page within my site. I've seen examples in other forums with the following syntax but this isn't working for me.
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "archive/archive.txt"
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
$('td:eq(2)', nRow).html('' +
aData[2] + '');
return nRow;
},
I don't see any javascript errors with this format but the hrefs never get added almost like fnRowCallback never kicks in. Any help would be much appreciated.
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "archive/archive.txt"
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
$('td:eq(2)', nRow).html('' +
aData[2] + '');
return nRow;
},
I don't see any javascript errors with this format but the hrefs never get added almost like fnRowCallback never kicks in. Any help would be much appreciated.
This discussion has been closed.