how to make Ejs Data collect over a series of runs of experiments?

i adapted the DataCollect() from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1945msg7137;topicseen#msg7137 into my collision cart applet.

but the data in the table is erase every time i reset the applet,

My attempt to solve this
so i customize the initialize page to allow DataCollect(), remembering that reset truly reset completely.

but i can't get it to work, any suggestion or codes that do this for me to learn from?

basic aim is to get Ejs to collect the data and student analyse the data, instead of getting them to copy the cells in the table.