I have a web page that has 2 parts (1) a form with certain inputs (search filters) (2) DataTable that reacts to submit.
Is there a way I can reload or refresh the DataTable on form submit? User can look at the data; tweak the search criteria in form and resubmit.
For now I am pre populating the DataTable with default data on page load. How can I make it reach to submit() button and reload / redraw itself using the form data?
<script>
$(document).ready(function() {
$('#dtQryResults').DataTable({
responsive: true,
"bProcessing": true,
"serverSide": false,
"order" : [[2, "desc"]],
"ajax":{
url :"./include/mysql/qryresults.php?tx=default", // json datasource
type: "GET", // type of method ,GET/POST/DELETE
error: function(){
$("#dtQryResults").css("display","none");
}
}
});
</script>