How could a url be placed in a specific field of a DataTable? Let's suppose for example that I have a table where I show the personal data of a person and I want the field with its address to be clickable and direct me to a specific link. For the time being I can get the information displayed and ordered in the following way:
$(document).ready(function() {
$("tr:odd").css("background-color", "#fff"); // filas impares
$("tr:even").css("background-color", "#dddddd"); // filas pares
$('#mitabla').DataTable({
"columns": [ //ANCHO
{
"width": "5%"
}, //nombres
{
"width": "5%"
}, //apellidos
{
"width": "5%"
}, //cedula
{
"width": "5%"
}, //telefono
{
"visible": false,
"width": "11%"
}, //ID
{
"width": "5%"
}, //acciones
],
"order": [
[0, "asc"]
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_process.php",
"dom": "<'row'<'col-sm-3'l><'col-sm-6 text-center'B><'col-sm-3'f>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
"language": {
"lengthMenu": "Mostrar _MENU_ registros por pagina",
"info": "Mostrando pagina _PAGE_ de _PAGES_",
"infoEmpty": "No hay registros disponibles",
"infoFiltered": "(filtrada de _MAX_ registros)",
"loadingRecords": "Cargando...",
"processing": "Procesando...",
"search": "Buscar:",
"zeroRecords": "No se encontraron registros coincidentes",
"buttons": {
"colvis": "OCULTAR COLUMNAS",
},
"paginate": {
"next": "Siguiente",
"previous": "Anterior"
}
},
buttons: [
'colvis'
],
columnDefs: [{
visible: false
}]
});
});