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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -