Here is my fiddle: jsfiddle.net/XR8EZ
I cannot get the save data to load after clicking the load button. Can anyone help me here?
Sorry for the length =D
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The load routine is wrong.
You save all your datas (stringifyed) with setItem(‘serializedObj’).
Then you retrieve value with “retrievedItem = localStorage.getItem(‘serializedObj’);” but not save the value of “JSON.parse(retrievedItem);”.
Then you try to retrieve values directly by localStorage.getItem(imgName);
You retrive and save data parded:
Then you must use this value for retrieving values:
You have to correct you save/load code, I suggest you to save you data as array:
So you must read it as: