Create and remove DataTable dynamically
Create and remove DataTable dynamically
dkean
Posts: 2Questions: 0Answers: 0
I am using a jQuery DataTable on a site, but all the data in the table changes every time I press a different hyperlink. So rather than delete the rows and add them one by one, is there a way to dynamically remove the entire DataTable and recreate another one with all the data with an array.
The code here is just plan old static stuff but I know how to dynamically fetch the array, let's say the array looks like this when I get it back from python/cherryPy:
ar[n]=["col1","col2","col3","col4",..."coln"] :
The code below is the static code for creating the DataTable in the HTML (static)...
*ProposalVote For ddA
BlaBlaBlaMore BlaBlaBla CheeCheeChee ChooChoo... LaLaLa
How would I do this in JavaScript or jQuery?
Dennis
The code here is just plan old static stuff but I know how to dynamically fetch the array, let's say the array looks like this when I get it back from python/cherryPy:
ar[n]=["col1","col2","col3","col4",..."coln"] :
The code below is the static code for creating the DataTable in the HTML (static)...
*ProposalVote For ddA
BlaBlaBlaMore BlaBlaBla CheeCheeChee ChooChoo... LaLaLa
How would I do this in JavaScript or jQuery?
Dennis
This discussion has been closed.
Replies
Allan