load data into table after form submission

load data into table after form submission

thomaswfrythomaswfry Posts: 2Questions: 2Answers: 0

I have a form that gives the option of 5 different reports. I dont know which report I am running until the user clicks a button, then the data depends on which company they want the report for, so basically I have to load a blank table at start. The user selects the report and then i reload the page showing the table headers for that particular report. Now the user selects a company from a drop down list and the page sends off an ajax request for the data then returns some json. i have to massage that data somewhat before i can put it into the table. once the data is in the right format that i need i do an append to add the data, all looks great, except for the fact that datatables says that there is no data ?

I know it's kind of hard to explain but bascially i have to add my data after the table loads, and at that point datatables is already loaded and that causes the copy, csv, print buttons to show no data in the table?

http://jsfiddle.net/TyDJk/

This discussion has been closed.