First, don't worry about going back from the first image, or forward from
the last image.  Just getting it working for the "normal" cases.  Then, when
you're done, just add a conditional around the links.

This:
<a href="" + 1#">next</a>

Becomes:
<cfif url.imageID EQ getImageCount.count>
   <a href=""> <cfelse>
   <a href="" + 1#">next</a>
</cfif>

The second half of the conditional is exactly what you had before.

You'll obviously need to do the same type of thing for the "previous" button
as well.

Cheers,
barneyb

> -----Original Message-----
> From: Asheem Dubey [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 20, 2004 12:05 PM
> To: CF-Talk
> Subject: Navigation for Dynamic Image Gallery
>
> Hi all,
> Possibly a stupid question.Here's my problem. I have a photo
> gallery which changes based on the product so say I have 10
> photos for product A and 21 photos for Product B. The file
> paths are defined in the db. Now I am trying to create a
> slide show for each product. I was trying to figure out how
> to structure the code so that the next button would bring up
> the second image and so on and so forth till there are null
> records at which point it would go back to the first image.
> Could you folks give me some pointers.
> Appreciate your help.
> Regards,
> Al
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to