Click to See Complete Forum and Search --> : image viewer in javascript


Lucky-8
June 10th, 2008, 01:39 PM
i have in a webpage around 10 pictures which are displayed in a table in small sizes and on the same page on the right side there is a bigger viewing area so that if the user clicks on the image on the left that is displayed on the right............ i have written code for it but wats happening now is once i click on one picture and go on to the next one the picture changes on the right side but if i go back to a previously clicked picture on the left side the change does not show on the right.

function loadPhoto(photoName)
{
//alert("object :"+document.getElementById(photoName+"span"));
//document.getElementById(photoName+"span").style.Z-INDEX = '50';
document.getElementById(photoName+"span").style.left = '230px';
document.getElementById(photoName+"span").style.visibility = 'visible';
document.getElementById(photoName+"span").style.top = '0px';

}
</script>

PeejAvery
June 11th, 2008, 12:39 PM
The code posted is hardly suffice to duplicate your problem. Can you please post more relevant code so that we can test it as well?

Xeel
June 30th, 2008, 12:03 AM
u r just altering styles in your example. Could we have more code?

The only thing that could be said at the moment: check src/backgroundUrl links in your scripts. Use dummy images to force browser to reload pictures.

iliiad
July 12th, 2008, 02:54 AM
you are just setting some styles of the photoname+"span" element with that function, so I'm not sure what you are trying to do here?