This function does not look right:
If you are trying to set the width of the images, then this:
function setStyle(baseval) { var style = document.getElementById("inner").getElementsByTagName("div"); for (var i = 0; i < images.length; i++) { style[i].style = baseval + "px"; } }
should look like this:
function setStyle(baseval) { var images = document.getElementById("inner").getElementsByTagName("img"); for (var i = 0; i < images.length; i++) { images[i].style.width = baseval + "px"; } }
Otherwise, if you are trying to set the width of the div itself, then it should look like this:
function setStyle(baseval) { var div = document.getElementById("inner"); div.style.width = baseval + "px"; }
source share