| | |
Need help with ColdFusion multipages
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2004
Posts: 4
Reputation:
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:
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
Posts: 3
Reputation:
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:
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
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
![]() |
Other Threads in the ColdFusion Forum
- Previous Thread: cfchart problem
- Next Thread: Recordset Paging Problem
| Thread Tools | Search this Thread |





