I know how to remove a tr from the table1 on click of delete. But i want to insert it in to another table .
How to do that?
here is the code i used to remove the tr.
<script languge="javascript" type="text/javascript">
$(document).ready(function() {
$('a.delete').click(function(e) {
e.preventDefault();
//Getting the TR to remove it in case of successful deletion
var objRow = $(this).closest('tr');
$.ajax({
type: 'post',
url: "<?= site_url('test/fndelete') ?>/",
data: {"id":$(this).prev().text()},
success: function(results) {
if (results == "") {
objRow.remove();
} else {
alert("Error!");
}
}
});
return false;
});
});
</script>