trouble pulling from getElementbyId
Hey guys. I have a thumbnail gallery that replaces the src of the main image onclick. What I would like to do is display the title attribute (or even better yet if possible, an html snippet unique to each image) when the new image is placed. The thumbnail gallery switcher works fine, but I can't get the title attribute to display. I tried this method:
Any ideas? If its not too difficult I'd prefer the unique html snippet, but if its a hassle this will be fine. Thank you guys!
<div id="large"><img src="images/1.jpg" id="large" title="image 1" name="ID#-04" alt="fda" />
It seems you've placed the same ID name into both your DIV and IMG tags. You should only need it in the IMG tag (ie. remove or change the ID in the DIV tag)...then your script should work.
Ids must be unique. So they can only be used once on the page.
Names, and class names can be used multiple times. Only one name can be given to each element, while multiple classnames can be.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)