Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81909

Reloading Data in a datatable on form submit...

$
0
0

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>

Viewing all articles
Browse latest Browse all 81909

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>