V
V
voe2015-12-17 12:49:38
JavaScript
voe, 2015-12-17 12:49:38

How to load results received via ajax into DataTables?

I display for data input to the user (via form_tag) after clicking on Search, the request goes to the server.
How in view.js.erb will refer to the table (datatables) to enter the received data into it.
If you insert into view.js.erb, for example - console.log("test") then the message is successfully displayed in the browser console i.e. processing is working.
DatatTables itself has an API for reloading data - datatables.net/reference/api/ajax.reload%28%29
but something I can't figure out exactly how to use it.
Very little experience. :(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question