Postponed data table initialisation until user inputs search criteria
Postponed data table initialisation until user inputs search criteria
cj1005
Posts: 144Questions: 46Answers: 1
Hi,
I have created my search inputs and linked a JS function, but I'm not sure how to 1) Stop my data table from initialising on page load up and also then how to initialise my data table from a JS function.
I'm sure both are simple but I just cannot find what I'm looking for.
Thanks, Chris
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Here is an exampleI use to show how to dynamically build the columns:
http://live.datatables.net/huyexejo/1/edit
The key is the Datatable is initialized in the Ajax success function. You can add a
data
option to the jQuery ajax() request to pass the search value to the server.Kevin
Perfect thank you