If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Maybe I'm misunderstanding what's going on but if you want a list you can't use the same name variables for separate entries, otherwise you are just overwriting the previous data. You need to keep track of how many entries you have, such as by using a 'listIndex' variable in localStorage and then giving each entry a number index, as in 'distance0','distance1', etc. Make sure to increment the value of 'listIndex' every time you make an addition.

If you have new data AND pre-existing data you must:
(1) retrieve the old data from local storage
(2) add the new data to the old data.
(3) store it ALL again in localStorage
(4) Do it in the order set forth in items 1-3 above.