Hi there,
I am new in web development. I think this problem is related to javascript. My javascript script is below which changes images after 2 sec. But when i call my start function in img tag in my third row div of my layout, it does not show images in that div or in that area. It show that series of images in first row.
<script>
var images = new Array ("img/1.jpg", "img/2.jpg", "img/3.jpg");
var currentIndex = 0;
function Start()
{
setInterval("ChangeImage()", 2000);
}
function ChangeImage()
{
currentIndex++;
if(currentIndex == images.length)
{
currentIndex = 0;
}
document.images[0].src = images[currentIndex];
}
</script>
first div in html:
<div id="menu">
<img src="header/menu.png" name="menu" id="m"/>
</div>
My slideshow images places here, u can see i have call Start() function in another div.
3rd div html:
<div id="slideshow-img">
<img src="img/3.jpg" name="myimg" id="myimg" onclick="Start()"/>
</div>
Please resolve my problem as soon as possible, I'll highly appreciate.