oTable
strings have unique identifiers.
Why is this code not working?
oTable.fnDeleteRow( oTable.fnGetPosition( $('#row'+id+'-tr')));
error:
[18:10:44.631] nNode.nodeName is undefined @ http:
Thanks!
change
Example:
<table> <thead> <th> <td>Name </td> <td>Delete</td> </th> </thead> <tbody> <tr id="row0-tr"> <td> Row 0 </td> <td> <Button onclick="deleteRow(0)"> - </td> </tr> <tr id="row1-tr"> <td> Row 1 </td> <td> <Button onclick="deleteRow(1)"> - </td> </tr> <tr id="row2-tr"> <td> Row 2 </td> <td> <Button onclick="deleteRow(2)"> - </td> </tr> </tbody> </table>
change 2:
The real problem: how to get table row using id
?
The fnGetPosition($('#row'+id+'-tr')
method does not return a string.
I put this code before calling fngetPosition: console.log($('#row'+id+'-tr'))
and returns: ({length:1, 0:({}), context:({}), selector:"#row1-tr"})
Thanks for the help!
source share