I have a button with id="reset"
, So when the button is clicked I want to do two things:
datatable
.
Js/jQuery:
$("#reset").click(function(){
$("myform").reset();
var oTable = $('#documentreport').dataTable();
oTable.fnDraw();
}
This is what I have tried so far. Any help would be appreciated
refresh database:
Calling $('#table').dataTable().fnDestroy();
will clear the table of dataTable code and allow you to manipulate the table, and then call dataTable
on it again.
Reset form: http://jsfiddle.net/8zLLn/
$('#reset').click(function(){
$('#myform')[0].reset();
});
very well answered by shmuel613 and tadiou thank you both.