You have CFOUTPUT tags in there. Using output="true" on your
CFFUNCTION tag doesn't provide the outputability that
ENABLECFOUTPUT="true" requires. Here's a [rather ugly] example that
illustrates my point:
<cffunction name="test1" returntype="string">
<cfset var result = "" />
<cfsavecontent variable="result">
test
</cfsavecontent>
<cfreturn result />
</cffunction>
<cffunction name="test2" output="true" returntype="string">
<cfset var result = "" />
<cfsavecontent variable="result">
test
</cfsavecontent>
<cfreturn result />
</cffunction>
<cffunction name="test3" output="false" returntype="string">
<cfset var result = "" />
<cfoutput>
<cfsavecontent variable="result">
test
</cfsavecontent>
</cfoutput>
<cfreturn result />
</cffunction>
<cfoutput><pre></cfoutput>
<cfsetting enablecfoutputonly="false" />
<cfoutput><strong>Test 1:</strong></cfoutput> <cfset writeOutput(test1()) />
<cfoutput><strong>Test 2:</strong></cfoutput> <cfset writeOutput(test2()) />
<cfoutput><strong>Test 3:</strong></cfoutput> <cfset writeOutput(test3()) />
<cfsetting enablecfoutputonly="true" />
<cfoutput><strong>Test 1:</strong></cfoutput> <cfset writeOutput(test1()) />
<cfoutput><strong>Test 2:</strong></cfoutput> <cfset writeOutput(test2()) />
<cfoutput><strong>Test 3:</strong></cfoutput> <cfset writeOutput(test3()) />
<cfoutput></pre></cfoutput>
In the test3 function, note that even though the function doesn't
return any output, the text inside the CFSAVECONTENT is still captured
and stuck in the 'result' variable, before the function's output is
ignored. So we're both right, just talking about different things.
;)
cheers,
barneyb
On 1/19/06, Raymond Camden <[EMAIL PROTECTED]> wrote:
> Ah yes, that was the word. However, you are incorrect. You can
> generate output from a method with output=false. It just gets
> discarded. This is an example:
>
> <cffunction name="test" output="false" returnType="string">
> <cfset var str = "">
> <cfsavecontent variable="str">
> <cfoutput>
> #now()#
> </cfoutput>
> </cfsavecontent>
> <cfreturn str>
> </cffunction>
>
> <cfoutput>#test()#</cfoutput>
>
> I do this all the time when I'm creating a string that is complex.
> It's easier to use cfsavecontent then a bunch of foo & goo & etc.
>
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 100 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230053
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54