0

I have a first HTML page, where I do a drag and drop and put the file got with the drag and drop, on the firebase storage. When I finished the drag and drop and the sending of the files to the firebase storage, I have created a double array, where I put all the information that I need, so, the name of each files and their downdoable link aswell.

And I need to re-use this same array, on a second HTML page. How can I do it?

9
  • We would need waaaaay more information to give a relevant answer, it would also be worth including a minimal example of what you have so far. Commented Oct 4, 2018 at 13:00
  • 2
    Try to save it in LocalStorage on the First page and retrieve it on the Second. Commented Oct 4, 2018 at 13:01
  • I hope it helps , stackoverflow.com/questions/3357553/… Commented Oct 4, 2018 at 13:07
  • I understood how it works, but how can i use this localstorage in a differant JS file ?? :( @AnjanKumarGJ Commented Oct 4, 2018 at 13:09
  • 1
    Set: sessionStorage.setItem("array", yourArray); Retrieve: sessionStorage.getItem("array"); link: w3schools.com/jsref/prop_win_sessionstorage.asp Commented Oct 4, 2018 at 13:54

1 Answer 1

1

You can use sessionStorage

Set:

sessionStorage.setItem("array", yourArray);

Retrieve:

sessionStorage.getItem("array");

link: w3schools.com/jsref/prop_win_sessionstorage.asp

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.