I created one html file where are all the photos and one another html file where I see only 1 image full sized. Now If I click one image from the first file I want these to be open into this second html page using his src from the first file I want to use javascript. (yeah I know I can create 20 html files where in each have a different photo but I want to use only 1 html file)
File 1 = "index.html":
 <a href="work_detail.html" ><img src="images/templatemo_image_01_big.jpg" alt="image" 
 width="100%" height="100%" id="pic1" onClick="hello();" /></a>
File 2 = "work_detail.html" :
 <a target="_parent"><img src="" alt="product" id="work" /></a>
JavaScript:
 function hello(){
  var pic1 = document.getElementById('pic1').src;
 document.getElementById('work').src= pic1;
 }
How to connect the first id with the second id where them are in different files using JavaScript?
 
     
     
     
    