jquery - Hide sensitive data in html table column -


i have html table , first column has id. column hidden. have read bad approach.

but need hidden id when user selects row , click delete button ajax post id.

where else should put id per row differently , why approach bad?

add id attribute in table rows. this:

<tr data-id="1">     <td><span class="delete">delete</span></td> </tr>  <tr data-id="2">     <td><span class="delete">delete</span></td> </tr> 

and when user click on delete or edit, jquery.

$('.delete').bind('click', function (e) {     var $row = $(this).closest('tr');     var id = $row.attr('data-id');      // have `id` }); 

Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -