I'm writing an image gallery script in which the thumbnail for the currently-viewed image is indicated with a smaller image below the thumbnail. My placeholder is as follows:
<img name="indicator0" alt="indicator>
with indicator1, indicator2, etc. following. In my script, which placeholder has the indicator is called by the variable thumbIndicator. I'd like to be able to do that like this:
document.(thumbIndicator).src = "indicator_image.jpg";
but this has not worked. I've also changed my image placeholder to this:
<img id="indicator0" alt="indicator">
and the script to this:
document.getElementByID(thumbIndicator).src = "indicator_image.jpg";
but that hasn't worked either.
I have been designing websites for a while now, have a fair amount of experience with PHP/MySQL, but am new to JavaScript. Any help is greatly appreciated.