Using a function to output isn't really the done thing in CF. Use either a custom tag, module include or plain cfinclude to modularise your output logic. If the function performs some action on a string and you want it output, you should do something like:
<cffunction name="myFunction"...> .... <cfreturn "String that has been modified... or something" /> </cffunction> <cfform...> .... <cfoutput>#myFunction()#</cfoutput> </cfform> HTH Dominic 2009/1/14 Gerald Guido <gerald.gu...@gmail.com>: > Is it getting rendered out side the cfform? > > > On Wed, Jan 14, 2009 at 12:16 PM, Damayanti Gupta <dgu...@archemix.com>wrote: > >> I have a cfform. From this I call a function, which has cfoutput tags to >> output text. However this text is not getting printed to the form. Is this >> expected? Is there a way around this? >> Thanks >> NG >> >> e.g. >> >> <cfform...> >> This is a form >> <cfset doPrint()> >> </cfform> >> >> <cffunction name="doPrint"...> >> <cfoutput>This is data to be printed</cfoutput> >> </cffunction> >> >> STATEMENT OF CONFIDENTIALITY: >> The information contained in this electronic message and any attachments to >> this message are intended for the exclusive use of the addressee(s) and may >> contain confidential or privileged information. If you are not the intended >> recipient, or the person responsible for delivering the e-mail to the >> intended recipient, be advised you have received this message in error and >> that any use, dissemination, forwarding, printing, or copying is strictly >> prohibited. Please notify Archemix Corp. immediately at either (617) >> 621-7700 or by return fax at (617) 621-9300 and destroy all copies of this >> message and any attachments. >> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317963 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4