currentSlide is a URL param - needed on first entry and passed in the hrefs
therafter. Here's a quick-and-dirty working demo. You'll need to call it
"t11.cfm" or change the href's.



<cfset totalSlides=10>

<cfset nextSlide = (currentSlide MOD totalSlides) + 1>
<cfset prevSlide = (currentSlide - 1) + (totalSlides * (currentSlide eq 1))>

<cfoutput>
        NEXT:#nextSlide#&nbsp;&nbsp;
        CURR:#currentSlide#&nbsp;&nbsp;
        PREV:#prevSlide#

<p style="margin-left:60px;"/>
        <a 
href="t11.cfm?currentSlide=#prevSlide#">&lt;PREV</a>&nbsp;&nbsp;&nbsp;
        <a href="t11.cfm?currentSlide=#nextSlide#">NEXT&gt;</a>
</cfoutput>




-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 22, 2006 11:31 AM
To: CF-Talk
Subject: RE: next and previous buttons for slideshow


I've been following this thread because the method
of "next / previous" is better than what I currently use...so...

I was looking over the code below and I have a few questions...

How is the variable "currentSlide" being defined?  In assumed
previous code?

Also, would you put some hard numbers in there for me to view
how the functions are working?

TIA...

Rick



-----Original Message-----
From: Dave Francis [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 22, 2006 10:36 AM
To: CF-Talk
Subject: RE: next and previous buttons for slideshow


This should work:

        <cfset totalSlides=10>

        <cfset nextSlide = (currentSlide MOD totalSlides) + 1>
        <cfset prevSlide = (currentSlide - 1) + (totalSlides * (currentSlide eq
1))>




-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 4:45 PM
To: CF-Talk
Subject: RE: next and previous buttons for slideshow


Okay. I just condensed it into a CFC. now I don't have to look at that code
every time.

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 3:35 PM
To: CF-Talk
Subject: RE: next and previous buttons for slideshow


Really?

Durnit...that sucks...it's sooo clunky.








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238475
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to