First, set a variable called "CurrentPage" like this:
<CFSET CURRENTPAGE="ProdDocList.cfm">
Next, do your query for the information you want to display.
Then, place this code after your query. I use this so much, I use a CFINCLUDE.
<!--- Set the number of records to display on each page. --->
<CFSET ONEACHPAGE = 10>
<!--- Set the default startrow to 1 if a value was not passed. --->
<!--- Determine whether or not to show the previous or next links. --->
<CFPARAM NAME = "StartRow" DEFAULT = "1">
<!--- Set the value of endrow to the maxrows + startrow - 1 --->
<CFSET ENDROW = STARTROW + ONEACHPAGE - 1>
<!--- If the end row is greater than the recordcount, determine how many records are left. --->
<CFIF ENDROW GTE GETSEARCHINFO.RECORDCOUNT>
<CFSET ENDROW = GETSEARCHINFO.RECORDCOUNT>
<CFSET NEXT = FALSE>
<!--- Otherwise, set Next to true and determine the next set of records. --->
<CFELSE>
<CFSET NEXT = TRUE>
<CFIF ENDROW + ONEACHPAGE GT GETSEARCHINFO.RECORDCOUNT>
<CFSET NEXTNUM = GETSEARCHINFO.RECORDCOUNT - ENDROW>
<CFELSE>
<CFSET NEXTNUM = ONEACHPAGE>
</CFIF>
<CFSET NEXTSTART = ENDROW + 1>
</CFIF>
<!--- If StartRow is 1, set Previous to false. --->
<CFIF STARTROW IS 1>
<CFSET PREVIOUS = FALSE>
<!--- Othewise, determine the previous set of records. --->
<CFELSE>
<CFSET PREVIOUS = TRUE>
<CFSET PREVIOUSSTART = STARTROW - ONEACHPAGE>
</CFIF>
<!--- Determine how many pages will be displayed. --->
<CFSET NUMPAGES = CEILING(GETSEARCHINFO.RECORDCOUNT / ONEACHPAGE)>
<CFPARAM NAME = "PageNum" DEFAULT = "1">
Finally, here is your navigation bar:
<CFOUTPUT>
<TABLE>
<TR>
<TD ALIGN="center" VALIGN="middle"> </TD>
<TD>
<!--- If Previous is true, display the previous link. --->
<CFIF PREVIOUS>
<A HREF ="#CurrentPage#?StartRow=#PreviousStart#&PageNum=#DecrementValue(PageNum)#"> « Previous</A>
</CFIF>
</TD>
<CFLOOP FROM = "1" TO = "#NumPages#" INDEX = "ThisPage">
<CFIF THISPAGE IS PAGENUM>
<TD><B>[#ThisPage#]</B></TD>
<CFELSE>
<CFSET PAGENUMSTART = (((THISPAGE - 1) * ONEACHPAGE) + 1)>
<TD>
<A HREF ="#CurrentPage#?StartRow=#PageNumStart#&PageNum=#ThisPage#"> #ThisPage#</A></TD>
</CFIF>
</CFLOOP>
<TD>
<!--- If Next is true, display the previous link. --->
<CFIF NEXT>
<A HREF ="#CurrentPage#?StartRow=#NextStart#&PageNum=#IncrementValue(PageNum)#"> Next »</A>
</CFIF>
</TD>
</TR>
</TABLE>
</CFOUTPUT>
The only other important thing to to make sure you are passing all the variables you will need to do your query as URL variables in all three links in the navigation bar.
Good Luck!
Calista :-X
Jedi Knight,
Champion of the Force