javascript – How to update the table (bootstrap-table) via JS after registering?


After registering (within a modal), the table must be updated automatically. But I can not. OBS.: Languages ​​I'm using are PHP and JS.

In jsfiddle, there is a small demo, in the JS tab is the code (else) I'm trying to do to update the bootstrap-table query.


You can use ajax:

        type: 'POST',
        url: 'adicionar.php',
        success: function(data)

#add -> The id of a button that must be included to execute the action
Type -> Method of sending information
URL -> The function made in php that will be responsible for including in your table
.Table -> the class of the table where the result of the previous function will be sent

To show the information you can use an echo , there you go.

Scroll to Top