Solved

starting an ordered list at something besides 1 inside a cfoutput

Posted on 2003-11-05
6
235 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
Comment Utility
oh wait, looks like <ol..> tag has a start attribute. i should use this right?

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

Author Comment

by:sagardeo
Comment Utility
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
Comment Utility
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
Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

 
LVL 1

Expert Comment

by:Wasistdas
Comment Utility
or use #currentrow# along with that cfloop
0
 
LVL 1

Accepted Solution

by:
Wasistdas earned 250 total points
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now