OR using cfreturn...

Sometimes I wonder what's wrong with my OWN internan language processors...

If you return data from a CFC, the whitespace never makes it outside
the CFC because the CFC has it's own context.

If you output data to a page from within a CFC, the whitespace makes
it back to the page because the CFC's context is inserted into the
page's context.

I prefer to return, although I have sent data back to the page
directly. It's not very encapsulated, you might say. ;) and it comes
with it's own set of whitespace issues. I just got done dealing with
this in a UDF, too... I had to write a second UDF as a wrapper to call
the first, incorporating cfsilent into the wrapper UDF, because I'm
outputting text to a textarea tag and it kept inserting 2 extra line
breaks.

UGH... but it's working now.

Let us know how you come out.

Laterz,
J


On Sun, 27 Feb 2005 17:55:02 -0600, Jared Rypka-Hauer - CMG, LLC
<[EMAIL PROTECTED]> wrote:
> Alternatively, it could be a result of the CFC itself.
> 
> Any CFC that uses output="true" to send data back to the screen will
> insert whitespace for any code it executes.
> 
> Adding CFSILENT inside the cfcomponent tag and outside the cffunction
> blocks will help, as will putting cfsilent inside the cffunction and
> returning data instead of sending it back to the content stream.
> 
> 
> 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196746
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to