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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to put cfoutput 1

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
GB
I have a page with the followng structure

Code:
<div class="<cfoutput>#someFunc()#</cfoutput>"> Text </div>

<div class="<cfoutput>#someFunc()#</cfoutput>"> Text </div>

<div class="<cfoutput>#someFunc()#</cfoutput>"> Text </div>

<cfloop query="someQuery">
<cfoutput>#someQuery.someCol#</cfoutput>
<cfoutput>#someQuery.someCol1#</cfoutput>
<cfoutput>#someQuery.someCol2#</cfoutput>
<cfoutput>#someQuery.someCol3#</cfoutput>
</cfloop>

In a large page, I have a lot of cfoutput tags. I tried enclosing the entire page with 1 <cfoutput> set but I got an error saying my cfloop did not have a matching end tag.

What is the best way to structure this page. Is it best to continue using <cfoutput> tags around each #expression# ?
 
Code:
<cfoutput>
<div class="#someFunc()#"> Text </div>
<div class="#someFunc()#"> Text </div>
<div class="#someFunc()#"> Text </div>
</cfoutput>

<cfoutput query="someQuery">
#someQuery.someCol#
#someQuery.someCol1#
#someQuery.someCol2#
#someQuery.someCol3#
</cfoutput>
:)

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top