javascript - How to replace old table with new one in Handsontable? -
i have interface allows users type in mysql queries , click button execute queries. result of queries displayed in table created handsontable. following code:
var output = document.getelementbyid("output"); var hot = new handsontable(output, table_setting);
the problem is, every time button clicked, creates new table on old one. new 1 replace old one. tried using output.innerhtml = "";
before var hot = new handsontable(output, table_setting);
rid of old table. seems rid of old table, new table not appear anymore. best way this?
thank you!
you want first hot.destroy()
, create new hot
instance.
Comments
Post a Comment