hey guys,
having a little trouble trying to get a script to work. what i’m trying to do is make a very simple image gallery – you have a space for the big image that is loaded, and underneath will be little thumbnails of the pictures that you can load. when you click on one of those thumbnails it will load the full-sized version in the big image area. the big image area and the thumbnail image area are in separate divs, the big image one nested in the little one. it’s also linking to an external javascript file.
this is the code for my javascript file:
[code=php]<script language=”JavaScript”>
function LoadGallery(image,filename) {
document.GetElementById(image).src = filename;
}
</script>
and this is how it looks in my html:
[code=php]<div id=”littlepics”>
<div id=”bigpic”>
<img src=”images/step1/step1.jpg” width=”480″ height=”320″ id=”bigimage”>
<p>Step 1: Meet in person – do not rely on email or the telephone.</p>
</div>
<a href=”#_self” onclick=”LoadGallery(‘bigimage’,’images/step1/step1.jpg’)”><img src=”images/step1/thumbs/step1.jpg”></a>
<a href=”#_self” onclick=”LoadGallery(‘bigimage’,’images/step1/email1.jpg’)”><img src=”images/step1/thumbs/email1.jpg”></a>
<a href=”#_self” onclick=”LoadGallery(‘bigimage’,’images/step1/email2.jpg’)”><img src=”images/step1/thumbs/email2.jpg”></a>
<a href=”#_self” onclick=”LoadGallery(‘bigimage’,’images/step1/email3.jpg’)”><img src=”images/step1/thumbs/email3.jpg”></a>
<a href=”#_self” onclick=”LoadGallery(‘bigimage’,’images/step1/jenrachel.JPG’)”><img src=”images/step1/thumbs/jenrachel.JPG”></a>
</div>
</div>
click <a href=”
*steps i’ve tried to correct the issue
1. checked all syntax, paths and refs.
2. removed the doctype in my html file.
3. putting the thumbnail code in the same div as the big image code.
4. changed the thumbnail link attributes to onclick=”LoadGallery(‘bigpic.bigimage’) in case it didn’t know where “bigimage” was supposed to be.
5. changed the big image tag attributes to img name=”bigimage” instead of img id=”bigimage” in case this was some kind of problem w/ the doctype or something.
6. had multiple people check my code for syntax.
i am trying to view this page in Safari browser 1.3 (v312) which does support this – i’ve seen people do similar photo galleries on other sites.
if anyone can give me some kind of advice i’d really appreciate it, and thank you very much for your time in advance. ?