Forums

Give help. Get help.

  • # November 22, 2017 at 2:08 pm

    sorry if code is a bit cumbersome I’m a very new “developer”

    So, I created a form and when you hit submit 3 things happen:
    1. Input values are stored in an array inside localStorage.
    2. Values are retrieved and are shown up in dynamically created divs.
    3. Prevent submit (form is not sent).

    My problem is whenever I refresh the page after submitting new entries, the dynamically created divs disappear (while they’re still stored in localStorage).
    How do I keep my submitted divs even after refresh?

    I’ll appreciate any help/suggestion!
    Thanks.

    # November 23, 2017 at 1:50 am

    You should do the same function when loading the page as on the submit.
    I have an example here: https://codepen.io/jeroenreijs/pen/VrxGXO
    The loading of the tasks is done in here on submit and on loading the page.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag