Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table question

Status
Not open for further replies.

programmher

Programmer
Joined
May 25, 2000
Messages
235
Location
US
I have a page that has to reflect two tables positioned next to each other.

I need to reflect only the first 5 rows of each table; yest I need to provide a way the user can scroll down and view the remaining records.

How can I do this (short of using CFGrid?)
 
analize this code; it is code that regulates how many records is shown on each page, and user can select next or previous 5 or 10 records:


<!--- Set the default startrow to 1 if a value was not passed. --->
<!--- Determine whether or not to show the previous or next links. --->
<cfparam name=&quot;startRow&quot; default=&quot;1&quot;>
<!--- Set the value of endrow to the maxrows + startrow - 1 --->
<cfset endRow = startRow + onEachPage - 1>
<!--- If the end row is greater than the recordcount, determine how many records are left. --->
<cfif endRow GTE queryRecordCount>
<cfset endRow = queryRecordCount>
<cfset next = false>
<!--- Otherwaise, set Next to true and determine the next set of records. --->
<cfelse>
<cfset next = true>
<cfif endRow + onEachPage GT queryRecordCount>
<cfset nextNum = queryRecordCount - endRow>
<cfelse>
<cfset nextNum = onEachPage>
</cfif>
<cfset nextStart = endRow + 1>
</cfif>
<!--- If StartRow is 1, set Previous to false. --->
<cfif startRow IS 1>
<cfset previous = false>
<!--- Othewise, determine the previous set of records. --->
<cfelse>
<cfset previous = true>
<cfset previousStart = startRow - onEachPage>
</cfif> Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top