Initialize table after div load
Initialize table after div load
AAS
Posts: 7Questions: 5Answers: 0
Hello,
Im using AJAX to load a php page on a div element when selecting a dropdown select.
The problem is my table initialized on $(document).ready, but at that time the table is not loaded.
how can I initialize my table when the div is loaded?
Thanks!
This discussion has been closed.
Answers
Hi @AAS ,
There's two ways you could go.
The first, is to let DataTables control the
ajax
as in these examples here - that way the table is initialised and the data loaded when it returns.The second is to initialise or load the data in the Ajax success function, as shown in this thread.
Cheers,
Colin