View Single Post
  #2 (permalink)  
Old 10-16-03, 12:26 AM
Perry Perry is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Tennessee
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
if all the images are in the same directory, you could easily use PHP to read the directory listing into a javascript array and then use your JS fade function between each image. This way, you're not actually loading all the images on the page at once... only changing the src of one image with javascript. Like this:

<img id="myImage" src="placeholder.jpg">

document.getElementById(id).src = 'path/to/new/image.jpg;

You should write a function to do this for you using your PHP/Javascript array of images

just increment a counter each time nextImage is called or decrement if prevImage is called... If the next image's index is greater than imageArray.length just reset the counter and begin again.

<a href="javascriptrevImage();">
<a href="javascript:nextImage();">

It's late and I'm in the middle of some things here, or I'd flesh it out a bit more for you. Let me know if you need more help.
Reply With Quote