M
Mehdi
Hi,
I have 3 small images on my page. I also have a large image which is
displayed when any of the 3 small images is clicked. I do this to display a
large version of each image. On page load the large image displays the img1
by default.
But sometimes (in IE and NS) when I click on small images, the large image
is empty and if I refresh the page it will display it. Here is my code:
function ChangeImage(Img)
{
document.getElementById("LargeImg").src =
document.getElementById(Img).src;
}
and on click event of each small image I have:
OnClick="ChangeImage('Img1')"
OnClick="ChangeImage('Img2')"
OnClick="ChangeImage('Img3')"
Why is this happening?
Thanks for your time
Regards
Mehdi
I have 3 small images on my page. I also have a large image which is
displayed when any of the 3 small images is clicked. I do this to display a
large version of each image. On page load the large image displays the img1
by default.
But sometimes (in IE and NS) when I click on small images, the large image
is empty and if I refresh the page it will display it. Here is my code:
function ChangeImage(Img)
{
document.getElementById("LargeImg").src =
document.getElementById(Img).src;
}
and on click event of each small image I have:
OnClick="ChangeImage('Img1')"
OnClick="ChangeImage('Img2')"
OnClick="ChangeImage('Img3')"
Why is this happening?
Thanks for your time
Regards
Mehdi