-1

I am working with html javaScript. My issue is that I have two files index.html and output.html and fill the inputs in index.html and print the output in output.html using local storage. Everything is working fine but I am not able to display the image.

StefanM
  • 797
  • 1
  • 10
  • 17
Anuj Kumar
  • 160
  • 1
  • 2
  • 11

2 Answers2

2

Take the URL of image after uploaded. And store the URL in localStorage by using localStorage.setItem() function and in "output.html" get the URL value by using localStorage.getItem() function and set the URL as image source.

For more info https://developer.mozilla.org/en/docs/Web/API/Window/localStorage

satheeshk
  • 56
  • 1
  • hey @satheeshk I done that you told but it gives me error i.e Not allowed to load local resource: blob:null/cf849fb6-2b30-44cc-8366-ac20de390b66 – Anuj Kumar Oct 03 '16 at 08:58
0

Ok, you have two ways to solve that problem.

The first way, like mentioned in comment, to use some scripting language, to save image from input form in index.html.

The another way, to use properly google, especially stackoverflow, because many newbie questions have answers here: link is

Community
  • 1
  • 1
BSeitkazin
  • 2,889
  • 25
  • 40