This is what I put together recently.  It works for me for now.  

        <CFPARAM NAME="session.StuffListStartid" VALUE="0">

        <CFSET session.myStuffAll =
application.accountManager.getStuffQuery(0,0,0,session.srchUsers,session
..srchStat,session.sort,session.sortway)>
        <CFSET session.myStuffAllList =
valuelist(session.myStuffAll.account_id)>
        <CFSET session.myStuffCount = session.myStuffAll.recordcount>
        
        

<CFIF ISDEFINED("attributes.stID")>
        <CFSET session.StuffListStartid = attributes.stID>
<CFELSE>
        <CFSET session.StuffListStartid = session.myStuffAll.account_id>
</CFIF>


                <TR>
                        <TD COLSPAN="3" ALIGN="LEFT" VALIGN="TOP"
WIDTH="200" CLASS="listControl1">
                                <CFOUTPUT>
                                        <CFIF
session.myStuffAll.account_id NEQ session.StuffListStartid>
                                                <CFSET tmpIndex =
LISTFIND(session.myStuffAllList, LISTFIRST(myStuffShow))-
session.StuffListCount>
                                                <A
HREF="index.cfm?action=act&stID=#LISTFIRST(session.myStuffAllList)#">Fir
st Page</A>
                                                &nbsp;
                                                <A
HREF="index.cfm?action=act&stID=<CFIF tmpIndex GT
0>#LISTGETAT(session.myStuffAllList,tmpIndex)#<CFELSE>#LISTFIRST(session
..myStuffAllList)#</CFIF>">Previous Page</A>
                                        </CFIF>
                                </CFOUTPUT>
                                &nbsp;
                        </TD>
                        <TD WIDTH="300"
COLSPAN="<CFOUTPUT>#(colCnt-6)#</CFOUTPUT>" ALIGN="CENTER" VALIGN="TOP"
WIDTH="*" CLASS="listControl1">
                                <CFOUTPUT>
                                <B>#session.myStuffCount#</B> Records
Found 
                                </CFOUTPUT>
                        </TD>
                        <TD COLSPAN="3" ALIGN="RIGHT" VALIGN="TOP"
WIDTH="200" CLASS="listControl1">
                                <CFOUTPUT>
                                        <CFIF
LISTLAST(session.myStuffAllList) NEQ LISTLAST(myStuffShow)>
                                                <A
HREF="index.cfm?action=act&stID=#LISTLAST(myStuffShow)#">Next Page</A>
                                                &nbsp;
                                                <CFIF
((LISTLEN(session.myStuffAllList)-session.StuffListCount)+1) GT 0>
                                                        <A
HREF="index.cfm?action=act&stID=#LISTGETAT(session.myStuffAllList,
(LISTLEN(session.myStuffAllList)-session.StuffListCount)+1 )#">Last
Page</A>
                                                </CFIF>
                                        </CFIF>
                                </CFOUTPUT>
                                &nbsp;
                        </TD>
                </TR>
 

-----Original Message-----
From: Steve LaBadie [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 06, 2007 21:21
To: CF-Talk
Subject: RE: Previous/Next Navigation

HI Rich,
 
Thanks for the response. I didn't expect a piece of navigation to
disappear based on a condition to be so complicated.

________________________________

From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: Fri 4/6/2007 7:40 PM
To: CF-Talk
Subject: Re: Previous/Next Navigation



>
> On 4/6/07, Steve LaBadie <[EMAIL PROTECTED]> wrote:
> > I am trying to have this navigation disappear if total rows are less

> > than 25, not having much luck with logic. I can make them disappear,

> > but not for the right reasons.  I have tried <cfif URL.ShowAll LT 
> > 25, GTE 25; I also tried using the RowsPerPage variable with not the

> > right results either. Books never seem to have the examples that you

> > are looking for. Any direction would be helpful (websites, books,
etc.).



I blogged about this just now =)  I wrote the code you see on the blog
entry just the other day for a client that didn't like "ugly" url
variables....

http://www.opensourcecf.com/1/2007/04/Paging-Through-Record-Sets-without
-URL-variables.cfm

Rick






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274844
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to