Problem redrawing table after deleting using TableTools ajax button

Problem redrawing table after deleting using TableTools ajax button

RilmaxRilmax Posts: 7Questions: 0Answers: 0
edited May 2011 in General
Hello, please am using an ajax-extended Tabletools button to delete records from my database. But am a having a problem redrawing after successful delete on the server-side. Please help.
Actual server-side delete occurs in source2.jsp.
Here is my fnClick function:
[code]
{
"sExtends": "ajax",
"sButtonText": "Delete,
"bHeader" : false,
"bFooter" : false,
"mColumns": [0,2],
"bSelectedOnly": "true",
"sAjaxUrl" : "source2.jsp",
"fnClick": function( nButton, oConfig ) {
var sData = this.fnGetTableData(oConfig);


if (confirm ('Do you really want to delete?')){
$.ajax( {
"url": oConfig.sAjaxUrl,
"data": [
{
"name": "tableData",
"value": sData
}
],
"success": oConfig.fnAjaxComplete,
"dataType": "json",
"type": "POST",
"cache": false,
"error": function () {
alert( "Error detected when sending table data to server" );
}
} );

oTable.fnDraw();


}
else {alert('Not deleted');}
}
}
[/code]
This discussion has been closed.