Hi below is my datatable java script,
$('#Proj_emp_table').dataTable({
"sAjaxSource": "/projects/project_json/",
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "GET",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
}
});
And my html is ,
<table id='Proj_emp_table' class="display">
<thead>
<tr>
<th>Employee ID</th>
<th>Employee Name</th>
<th>Experience Prior to ASM</th>
<th>Joining Date</th>
<th>Asm Experience</th>
<th>Billing Start Date</th>
<th>Bill Status</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Employee ID</th>
<th>Employee Name</th>
<th>Experience Prior to ASM</th>
<th>Joining Date</th>
<th>Asm Experience</th>
<th>Billing Start Date</th>
<th>Bill Status</th>
</tr>
</tfoot>
</table>
Here my ajax request works fine and i am getting the json data properly and table is also formed. But how to add hyperlink to the a column.
Eg: Employee name column should have a hyperlink which should go to page like /employee/ID/
Here ID should be picked up from the json data itself that is my 1st field.