Hi folks, I’m trying to get a simple javascript + css photo gallery going and I just can’t figure out the most important part: how to change the evt.src to target the correct sub-directory.
The original code:
[CODE]function showSlide(evt) {
objectPhotoSlide.innerHTML='<img src=”‘+ evt.src +'” id=”largePhoto” alt=”Large Photo” border=”0″ />’;
What I amended but obviously isn’t working:
[CODE]function showSlide(evt) {
objectPhotoSlide.innerHTML='<img src=”photos/’+ evt.src +'” id=”largePhoto” alt=”Large Photo” border=”0″ />’;
The picture just won’t show up. What am I doing wrong here?
I got the original code from Jason Cranford Teague’s ‘CSS, DHTML & AJAX’ quickstart guide book. If any of you know this, please enlighten me!