Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Funkert #1
Split cfouput results
All right,
I've got quite a big output on my page which I want to split in pages of let's
say 10 or 20 products.
How do I do this ? I've already sorted the products by first letter but I
can't manage to split this output again.
Thanks for helping
Code:
<cfinvoke
component="siteje.components.product"
method="getproducten"
returnvariable="website">
</cfinvoke>
<html>
<head>
</head>
<body>
<center>
<p align="center"><strong><a href="software.cfm?sort=0-9">0-9</a> | <a
href="software.cfm?sort=a">A</a> | <a href="software.cfm?sort=b">B</a> | <a
href="software.cfm?sort=c">C</a> | <a href="software.cfm?sort=d">D</a> | <a
href="software.cfm?sort=e">E</a> | <a href="software.cfm?sort=f">F</a> | <a
href="software.cfm?sort=g">G</a> | <a href="software.cfm?sort=h">H</a> | <a
href="software.cfm?sort=i">I</a> | <a href="software.cfm?sort=j">J</a> | <a
href="software.cfm?sort=k">K</a> | <a href="software.cfm?sort=l">L</a> | <a
href="software.cfm?sort=m">M</a> | <a href="software.cfm?sort=n">N</a> | <a
href="software.cfm?sort=o">O</a> | <a href="software.cfm?sort=p">P</a> | <a
href="software.cfm?sort=q">Q</a> | <a href="software.cfm?sort=r">R</a> | <a
href="software.cfm?sort=s">S</a> | <a href="software.cfm?sort=t">T</a> | <a
href="software.cfm?sort=u">U</a> | <a href="software.cfm?sort=v">V</a> | <a
href="software.cfm?sort=w">W</a> | <a href="software.cfm?sort=x">X</a> | <a
href="software.cfm?sort=y">Y</a> | <a
href="software.cfm?sort=z">Z</a></strong></p><BR>
<table width="550" border="1" cellpadding="15" cellspacing="0">
<cfoutput query="website">
<cfif website.currentrow mod 2 eq 1>
<tr>
</cfif>
<td valign="top" align="center" width="100">
<a href="detail.cfm?recordid=#website.link#"><img
src="webpictures/#webpicture1#" border="0"></a>
</td>
<td> <B><a href="detail.cfm?recordid=#website.link#"
class="style2">#productgroep# ></a></B>
<BR><BR>
#webomschrijving_NL_kort#<BR>
<!--- //Niet aanwezig
Ontwikkelaar: #website.ontwikkela#<br> --->
<div align="right">Prijs: #LSEuroCurrencyFormat(website.SRP_EUR)#</div><BR>
<cfif IsBoolean(website.grootte_macdemo)>
<a href="#website.ftp_macdemo_calc#">Demo Mac</a> - #website.Grootte_macdemo#
kb<BR>
</cfif>
<cfif IsBoolean(website.grootte_windemo)>
<a href="#website.ftp_windemo_calc#">Demo Win</a> - #website.Grootte_windemo#
kb
</cfif>
<HR>
<div align="right">
</div></td>
<cfif website.currentrow mod 2 eq 1>
<tr>
</cfif>
</cfoutput>
</table>
</center>
</body>
</html>
Funkert Guest
-
formatting find results in results window or in savedfile
I want a :beer; :-). I want to write an extension that will allow me to format the results returned from a find. I couldn't find anything in... -
Complex join = no results (for a query that shouldreturn results)
I am trying to use a rather complex join that returns many results when the SQL server is queried directly, but returns no results when used on a... -
Sending search results to a results page..with asp
Please help.. very :confused; Ive setup 4 dynamic drop down boxes which populate themselves from my database, this all works fine..The last box... -
Query results don't display properly in results table.IGNORE PREVIOUS
:disgust; I need to display the results of a query. The query runs properly. My problem is having specific results display in specific locations in... -
Query results don't display properly in results table.
:disgust; I need to display the results of a query. The query runs properly. My problem is having specific results display in specific locations in... -
jdeline #2
Re: Split cfouput results
The CFQUERY tag has STARTROW and MAXROW attributes that can be used to limit
the number of items displayed. The trick is to initially set a variable,
let's call it start, to 1 and use it as the value for STARTROW. Then
increment start by MAXROW, and use this in the "Next" link that reloads the
page (start=#start#). When the page reloads, the new value for start will be
used. Your "Previous" link can be handled in the same way. And look out for
end conditions - you don't want start to get bigger than your recordCount nor
less than 0.
jdeline Guest
-
Funkert #3
Re: Split cfouput results
Ah, thanks for helping. Sometimes the solution is so simple :)
I'll try this.
Funkert Guest
-
Funkert #4
Re: Split cfouput results
OK, it works fine. But now this, I also made a filter to select products by
first letter, and this doesn't work in combination with the startrow/maxrow
thingy. I've tried several ways to combine them, without succeeding..
Funkert Guest



Reply With Quote

