hyperlink td concern
hyperlink td concern

first
I have this to define the hyperlink in the cell
"columnDefs": [
{ "targets": 10, "data": "Liga", "render": function ( data, type, row, meta ) {
return '<a id="valorLiga" target="_blank" href="' + data + '" title="Liga de la página seleccionada">Ir a la página</a>';
}
}
{ "targets": 10, "data": "Liga", "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
$(nTd).html("<a target='_blank' href='"+oData.Liga+"'>Ir a la página</a>");
}
}
]
which of the two is better, I saw the second one in the 2014 forum and the first one I don't remember
now well now I need to occupy the href of the specific cell to be able to edit / modify the value?
what should I do
fila = $(this).closest("tr");
Liga = fila.find('td:eq(10)').val(); o .tex();
I find it empty or the value of 'Ir a la página'
Thank you
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'd say go with the
columns.render
approach. If you usecell().invalidate()
orrow().invalidate()
after you update it, it should re-render.If that doesn't help, We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Colin
Thank you very much for answering, and I did not understand everything, for my low English and the translator I do it not very well, but what I think I understand is to redo my question, and I have to do it with the How to provide a test case, or explain it best. thank you
you can close the comment