Solved

starting an ordered list at something besides 1 inside a cfoutput

Posted on 2003-11-05
6
239 Views
Last Modified: 2013-12-24
if i do the below ordered list, it creates an ordered list starting with 1.

*********
<ol>
<cfoutput query="qname" startrow="41" maxrows="60">
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfoutput>
</ol>
*********

i.e.

1. steve from Denver, CO
2. lisa from tampa, FL
3. joe from nashville, TN
.
.
.

how do i get it to start at 41?

i.e.

41. steve from Denver, CO
42. lisa from tampa, FL
43. joe from nashville, TN
.
.
.
 

0
Comment
Question by:sagardeo
6 Comments
 

Author Comment

by:sagardeo
ID: 9690042
oh wait, looks like <ol..> tag has a start attribute. i should use this right?

<ol start=5.....>
0
 

Author Comment

by:sagardeo
ID: 9690048
or in my case

*********
<ol start=41>
<cfoutput query="qname" startrow="41" maxrows="60">
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfoutput>
</ol>
*********
??
0
 
LVL 14

Assisted Solution

by:Renante Entera
Renante Entera earned 125 total points
ID: 9691118
You can also have it this way :

<ol>
<cfoutput>
<cfloop query="qname" startrow=41 endrow=60>
<!--- You may assign any number for your parameter "endrow" --->
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfloop>
</cfoutput>
</ol>

Actually, your code should work.  I am referring to the code you posted on your question not on your comments.

Goodluck!
eNTRANCE2002 :-)
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Expert Comment

by:Wasistdas
ID: 9691260
or use #currentrow# along with that cfloop
0
 
LVL 1

Accepted Solution

by:
Wasistdas earned 250 total points
ID: 9691275
Well, to be more precise: Better use the following code instead of <ol><li>:

<cfouput query="qname" startrow="41" maxrows="60">

#currentrow#. <font face="arial" size="2">#firstname# from #city#, #state#</font><br>

</cfoutput>
0
 
LVL 12

Assisted Solution

by:jyokum
jyokum earned 125 total points
ID: 9691791
i think you answered your own question. this seems to work fine.

<cfquery name="qryData" datasource="whatever">
SELECT * FROM table1
</cfquery>

<cfset myStart=41>
<cfset myRowcount=60>

<cfoutput>
<ol start="#myStart#">
</cfoutput>
<cfoutput query="qryData" startrow="#myStart#" maxrows="#myRowcount#">
<li>#qryData.columnA# #qryData.columnB#</li>
</cfoutput>
</ol>
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question