Code:
window.onload = initiFrame; function initiFrame() { for (var i=0; i<document.links.length; i++) { document.links[i].target = "content"; document.links[i].onclick = setiFrame; } } function setiFrame() { document.getElementById("content").contentWindow.document.location.href = this.href; return false; }
Correct
Here is the wrong behavior link.
Wrong
Code:
imgName = new Array() for (x=1; x<=40; x++) { imgName[x] = x } contextPath = "http://i107.photobucket.com/albums/m287/tpkyteroo/ah/"; extension = ".jpg"; current = 1; window.onload = randomizeImage function randomizeImage() { changeImg() } function changeImg() { holder = document.getElementById("bgHolder"); holder.style.background="url(" + contextPath + imgName[current] + extension + ")"; if (current < imgName.length-1) { current = current+1 } else { current = 1 } setTimeout('randomizeImage()',20000); }
Comment