Please support our ColdFusion advertiser: Programming Forums
Views: 5660 | Replies: 7
![]() |
•
•
Join Date: Jul 2004
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Hello, I’m a jr. CF programmer trying to figure out how to create sets of multipages. What I want to do is create page sets of 10 and have an arrow link, which would jump you to the next 10 pages. The page selected would be the first number of the set, for example you have pages 1-10 then click the arrow and go to set 11-20. The page selected would be 11. I have no idea how to even attempt this task. Any input and/or suggestions would be more than appreciated. Thanks -Rebekah
•
•
Join Date: Jan 2005
Posts: 26
Reputation:
Rep Power: 4
Solved Threads: 0
Try this piece of code, it's old but it works: http://www.planet-source-code.com/vb...Id=14&lngWId=9
•
•
Join Date: May 2005
Location: Tucson
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Here's one way (from CFMX manual, pages 468-469):
<CFQUERY DATASOURCE="your_db" NAME="GetLinks">
SELECT link, link_ID FROM your_table
</CFQUERY>
<cfparam NAME ="MaxRows" default="10">
<cfparam NAME ="StartRow" default="1">
<CFOUTPUT QUERY="GetLinks" startrow="#StartRow#" maxrows="#MaxRows#">
#GetLinks.currentRow# --- #link#<BR>
</CFOUTPUT>
<CFIF (StartRow+MaxRows) LTE GetLinks.recordcount>
<a href="your_filename.cfm?StartRow=<cfoutput>#evaluate(StartRow+MaxRows)#</cfoutput>"><img src="/images/arrow.gif></a>
</CFIF><br>
<a href="your_filename.cfm?StartRow=1">Reset counter</a>
(too easy, so I decided to fill it out - just copy & paste; change MaxRows to output different number of records)
<CFQUERY DATASOURCE="your_db" NAME="GetLinks">
SELECT link, link_ID FROM your_table
</CFQUERY>
<cfparam NAME ="MaxRows" default="10">
<cfparam NAME ="StartRow" default="1">
<CFOUTPUT QUERY="GetLinks" startrow="#StartRow#" maxrows="#MaxRows#">
#GetLinks.currentRow# --- #link#<BR>
</CFOUTPUT>
<CFIF (StartRow+MaxRows) LTE GetLinks.recordcount>
<a href="your_filename.cfm?StartRow=<cfoutput>#evaluate(StartRow+MaxRows)#</cfoutput>"><img src="/images/arrow.gif></a>
</CFIF><br>
<a href="your_filename.cfm?StartRow=1">Reset counter</a>
(too easy, so I decided to fill it out - just copy & paste; change MaxRows to output different number of records)
•
•
Join Date: Sep 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
hi,
did you ever figure this one out or am i missing something in the posts below? as far as i can tell the replies u hd were pretty useless?
any ideas MUCH appreciated....
cheers
jon
did you ever figure this one out or am i missing something in the posts below? as far as i can tell the replies u hd were pretty useless?
any ideas MUCH appreciated....
cheers
jon
•
•
•
•
Originally Posted by rharp
Hello, I’m a jr. CF programmer trying to figure out how to create sets of multipages. What I want to do is create page sets of 10 and have an arrow link, which would jump you to the next 10 pages. The page selected would be the first number of the set, for example you have pages 1-10 then click the arrow and go to set 11-20. The page selected would be 11. I have no idea how to even attempt this task. Any input and/or suggestions would be more than appreciated. Thanks -Rebekah
•
•
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 24
Reputation:
Rep Power: 4
Solved Threads: 1
www.communitymx.com is another great site to help with all macromedia products.
Take care,
Walyer
Walyer's Playpen
Take care,
Walyer
Walyer's Playpen
•
•
•
•
Try this piece of code, it's old but it works: http://www.planet-source-code.com/vb...Id=14&lngWId=9
I tried adapting this piece of code to use on my guestbook to show X number of records per page, and produce a previous/next link, but it does absolutely nothing. I have tried numerous pieces of code to achieve this, but so far, nothing works. Any advice is definitely appreciated.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode