For Loop Problem

I'm trying to use a For loop to list a bunch of photos in a gallery

Junior Member

joined:Sept 6, 2008
posts: 50
votes: 0

I'm trying to insert a bunch of thumbnail photos into a table (very wide using CSS overflow) that will change the source of a full-size image below the table when clicked. I can get the thumbnails to show up, but the full-size image won't change when the thumbnails are clicked. And yes, the name and ID of the photo I want to replace is set to "photo." Please help me! Here's the code I've been trying to get work:

Junior Member

joined:Sept 6, 2008
posts: 50
votes: 0

Between the two of you, I got my code working perfectly! Thank you so much!

I've got one much question if you'll indulge me. I'm noticing that it can take a few seconds to get the full-size image loaded and displayed if it's not already in the cache. I don't want to slow the load time of the page initially to load the images into the cache, so I'm wondering if there's an easy way to utilize some kind of "loading" image, like the spinning line circle I've seen elsewhere. I imagine this is an AJAX thing, but I'm still just trying to get the basics of Javascript down. Could you point me in the right direction? If not, I'm still really grateful for the help you've given me so far.