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.
Asked
Active
Viewed 549 times
-1
-
You might need to use backend scripts like asp or php I doubt that it will work with `only js` – Siddhesh Kulkarni Oct 03 '16 at 07:39
-
please, provide your code – BSeitkazin Oct 03 '16 at 08:42
-
yeah sure @Beezy here github link https://github.com/Anuj-786/localstorage – Anuj Kumar Oct 03 '16 at 08:55
2 Answers
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