0

So I have a web page that has an image slide show of 6 different images 50x50 pixels. I would like to have it so that; when a user clicks the image, a new window pops up with the same images doing the same thing, but change the size to 200x200px. Is there an easy way to do this, am I close?

HTML:

JS: var mainImg = document.getElementById("slide");

var imgArray = ["slicedImg_01.gif", "slicedImg_02.gif", "slicedImg_03.gif",  "slicedImg_04.gif", "slicedImg_05.gif", "slicedImg_06.gif"];

var index = 0;

function imgCycle(){
mainImg.setAttribute("src", imgArray[index]);
index++;

if (index >= imgArray.length){
  index = 0;
}
}

setInterval (imgCycle,500);

function fullSize(){
  var big = window.open('assignment 1.1.html')

  document.getElementById("slide").height="200";

}
swam
  • 293
  • 6
  • 19

1 Answers1

0

You can access child element using your window object using plain javascript

var big = window.open('assignment 1.1.html')
big.document.getElementById("slide").height="200";

check this question and its answer, may it will help you.

how-can-i-access-the-dom-tree-of-child-window

Community
  • 1
  • 1
bharatpatel
  • 1,203
  • 11
  • 22