Deleting rows permanently from database
Deleting rows permanently from database
Helo, i am using datatables, i have selected multiple rows and deleting multiple rows on click of delete button., but they get deleted at runtime and not from database. i want to delete rows from database as well.
[code]
var oTable;
var giRedraw = false;
$(document).ready(function() {
/* Add a click handler to the rows - this could be used as a callback */
$('#example tr').click( function() {
if ( $(this).hasClass('row_selected') )
$(this).removeClass('row_selected');
else
$(this).addClass('row_selected');
} );
/* Add a click handler for the delete row */
$('#delete').click( function() {
var anSelected = fnGetSelected( oTable );
alert(anSelected.id);
for (var n=0; n
[code]
var oTable;
var giRedraw = false;
$(document).ready(function() {
/* Add a click handler to the rows - this could be used as a callback */
$('#example tr').click( function() {
if ( $(this).hasClass('row_selected') )
$(this).removeClass('row_selected');
else
$(this).addClass('row_selected');
} );
/* Add a click handler for the delete row */
$('#delete').click( function() {
var anSelected = fnGetSelected( oTable );
alert(anSelected.id);
for (var n=0; n
This discussion has been closed.
Replies
Allan
[code]
$('#delete').click( function() {
var oTable = $('#myTable').dataTable();
var aTrs = oTable.fnGetNodes();
for ( var i=0 ; i