当在AJAX,Jquery中使用GET更新数据库时,如何反映表上的更新

I have a table in my php file that is displayed using datatables. Upon clicking on a link in a row of the table, the database is updated using Jquery and GET AJAX. My database is getting updated, but table does not reflect the changes without a manual refresh. How do I make it possible, for the table values to reflect the changes immediately after the button is clicked. Code below:

$("#note").click(function(){
                var note = prompt('Enter note');

                if(note){ 

                    var xmlhttp = new XMLHttpRequest();
                    xmlhttp.onreadystatechange = function() {
                        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) 
                        {
                            alert("Record updated");
                        }
                    };
                    xmlhttp.open("GET", "db_update.php?id="+id+"&note="+note, true);
                    xmlhttp.send();


                    /* $.get("db_update.php", { id: id[$index], note:note });  */
                }
                return false;

            });

Please advise.

If you are using jquery datatable than this will help you:

$('#table_id').DataTable().ajax.reload();

otherwise make an ajax call to get the updated data from the database

You can do something like this

var id= "your id here";
var note = "Your default note";

var table = $('#dataTable').DataTable( {
        ajax: "db_update.php?id="+id+"&note="+note
});

$("#note").click(function(){
   var note = prompt('Enter note');
   table.ajax.url( "db_update.php?id="+id+"&note="+note ).load();     
});