This should help:
<cfif URL.StartRow GTE GetImages.recordcount>
<cfset URL.StartRow = 1>
</cfif>
----- Original Message -----
From: "Jay Patton" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, December 27, 2000 11:48 AM
Subject: it wont loop back!....
> here is my problem, when the code below gets ran it runs fine all accept
when it gets to the end of the list of images it keeps going with blank
pages with just a back and next button. my question is how do i get it to
loop back to the beginning of the list when it gets to the end or last
image? can anyone help? ive been stuck on this for some time now....
>
> <cfquery name="GetImages"
> datasource="catlingalleries"
> dbtype="ODBC">
> Select *
> >From ImageManager
> </cfquery>
> <cfset Year = GetImages.Year>
> <html>
> <head>
> <title>Early Work</title>
> <cfinclude template="includes/styles.cfm">
> </head>
>
> <body bgcolor="#000000"><center>
> <p><img src="images/catlin_hdr.gif"></p>
> <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"
color="White">Click Image to order and to view larger picture.</font></p>
> <table width="415" border="0" cellspacing="5" cellpadding="5">
> <CFPARAM NAME="URL.StartRow" DEFAULT="1">
> <cfoutput query="GetImages" startrow=#URL.StartRow# maxrows=8>
> <cfif Year EQ "Yes">
> <tr align="center">
> <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"
color="White"><a href="OrderManager/OrderForm.cfm?ImageId=#ImageId#"><img
src="ImageManager/WebImages/#GetImages.ImageName#"
border="0"></a></font></td></tr>
> <tr align="center">
> <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"
color="White">#RealName#</font></td></tr>
> </cfif>
> </CFOUTPUT>
> <tr align="center">
> <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"
color="White"><CFOUTPUT>
> <a
href="javascript:history.go(-1)">Back</a> | &nbs
p;<A HREF="early.cfm?StartRow=#Evaluate(URL.StartRow + 8)#">Next 8</a>
> </CFOUTPUT></font></td>
>
> Thanks much,
> Jay Patton
> Web Pro USA
> 406.549.3337 ext. 203
> 1.888.5WEBPRO
> www.webpro-usa.com
>
>
>
~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~
Get Your Own Dedicated Win2K Server! Instant Activation for $99/month w/Free Setup
from SoloServer PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support Visit
SoloServer, https://secure.irides.com/clientsetup.cfm.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists