CFC's, and especially web services, are generally considered to be used for 
data access or business logic, not for any type of display.

However, if you are dead set on doing this, then you can just put your HTML 
inside the CFFUNCTION just like you would with a custom tag.  You can 
specify output="yes" in the function declaration and then you don't need to 
use cfoutput in your function, or you can leave output attribute off and 
use cfoutput in your function.

Note that there is currently a bug in CFMX where html generated from a CFC 
is not displayed when the CFC is stored in a shared scope variable 
(application/session).

If you want to use a web service for this, then wrap all the output inside 
cfsavecontent and return it as a string.

HTH,

Sam

At 11:46 AM 12/9/2002, you wrote:
>Does anyone have an example of a CFComponent with a function that
>returns HTML formatted output. Trying to write a function that performs
>a query based on specific arguments then outputs a select box based upon
>the query results as well as some of the other arguments. I'd like to
>make it a web service but not sure if possible. (Documentation for this
>stuff seems kinda limited on MM, though I might just be looking in the
>wrong places.)
>
>Cutter

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to