Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
dspent #1
Next-N Interface
Currently I am using a custom tag to display records vertically then across...
ex:
1 4 7
2 5 8
3 6 9
The tag is called CF_Columns and is available for free at
[url]http://www.webtricks.com/customtags/code.cfm?CodeID=19[/url]
What I would like to know is how to modify the tag so that I get the same
display functionality, while at the same time being able to add a next-n
recordset navigation functionality to it as well....
Below is the code I use to display the records and following that is the
actually custom tag script....
DISPLAY CODE:
<cf_columns cols="5" Records="#PhoneQuery.RecordCount#">
<table border="0">
<tr>
<!--- Loop over the number of columns and display the data for each
column. --->
<cfloop index="LoopCount" from="1" to="5">
<cfset start = ("start" & LoopCount)>
<cfset end = ("end" & LoopCount)>
<td valign="top" width="145px">
<cfoutput query="PhoneQuery" startrow="#Evaluate(start)#"
maxrows="#Evaluate(end)#">
<span class="SmallLinkText">
<div align="center" class="SmallLinkText">
<a href="../pub/empdetail.cfm?EmpID=#EmpID#" title="Phone - #Office#"
onMouseOver="window.status='Click to View More Details'; return true"
onMouseOut="window.status=''">
<strong>#TitleCase(LastName)#,
#TitleCase(FirstName)#</strong></a></div><p>
</cfoutput>
</td>
</cfloop>
</tr>
</table>
CUSTOM TAG CODE:
<CFSET #cols# = #Attributes.Cols#>
<CFSET #items# = #Attributes.Records#>
<CFSET #colstogo# = #IncrementValue(cols)#>
<CFSET #remain# = #items#>
<CFSET #total# = 0>
<CFLOOP INDEX = "LoopCount" FROM = "1" TO = "#cols#">
<CFSET #colstogo# = #DecrementValue(colstogo)#>
<CFSET #StartTemp# = ("Caller.start" & #LoopCount#)>
<CFSET #EndTemp# = ("Caller.end" & #LoopCount#)>
<CFPARAM NAME = "#StartTemp#" DEFAULT = "#IncrementValue(total)#">
<CFPARAM NAME = "#EndTemp#" DEFAULT = "#Ceiling(remain/colstogo)#">
<CFSET #total# = (#total# + #Evaluate(EndTemp)#)>
<CFSET #remain# = (#items# - #total#)>
</CFLOOP>
What I want to be able to do is display the first 60 records (total of 400)
then have a link to the next 60 and so on, but still be able to have the output
display the way it does with this tag.
Thanks
-Jones
dspent Guest
-
#39403 [NEW]: A class can't implements interface implemented by implemented interface/classes
From: baldurien at bbnwn dot eu Operating system: Irrelevant PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug... -
interface to 3d
i am trying to add one image interface to my 3d cast member......when i minimise the browser or if some other application overlaps the image... -
Web DB Interface
Hello, I am receiving a 500 internal error after creating a database wizard connection in FP. I can get to the login page and login. When the... -
Interface
Hi there, I have made an interface in Photoshop and imported it into Director, it contains a title bar with text on it. What I am trying to achieve... -
Does Interface Size Matter? Is my interface too complex?
Hi all, Does Interface Size Matter? Is my interface too complex? I volunteered to design a couple of web pages, but since we don't have a...



Reply With Quote

