I have a table that has the Material ID and the Name, the name is a link, I need to make it when I click the link it takes the ID and the name puts it in a text field in the form.
The table is generated dynamically by a script
$('#tbl').append("<tr class=\"corpoTbl\"> <td class=\"ids\">" + item.ID +
"</td><td class=\"nome\"><a href=\"#\" onclick=\"Seleciona()\">" + item.Nome + "<\a></td></tr>")
I'm trying to get the link text like this:
function Seleciona(event) {
var id = event.ID
var nome = event.Nome
$('#ID').val(ID);
$('#nome').val(nome);
$(this).dialog("close");
}