First, why the use of cfsilent? Is it because you discover that calls to
cffunction-based UDFs generate white space? Simply add output=false to
your cffunction tag and that will go away. (This assumes your UDF isn't
mean to output directly, which it should not do 99% of the time.)

So, what do you get if you add isDefined("ct_out"), does it return
false? Also, I notice you set stringbalue to
application[somekey][somekey]etc. Are you sure that key exists?

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Lee, Sima - Workstream [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 21, 2003 12:08 PM
> To: CF-Talk
> Subject: problem with CFFunction return
> 
> 
> Hi All,
> 
> We are just in the process of upgrade CF4.5 to CFMX. We had a 
> very strange problem with <CFFunction>. 
> 
> We have a very simple function which returns a string:
> 
> <CFFUNCTION name="getString" returntype="string">
> <CFARGUMENT name="VarName" type="string" required="true"> 
> <CFARGUMENT name="Pcode"  type="string" required="true">
> <CFARGUMENT name="suff"   required="true">
> <CFARGUMENT name="LgCode"  default="#g_LG#" type="string" 
> required="false" > <CFSET var 
> stringvalue=application["lg#lgcode#"][pcode][varname]>
> <CFIF suff NEQ ""><CFSET Stringvalue= StringValue & 
> suff></CFIF> <CFRETURN Stringvalue> </cffunction> 
> 
> Then using <CFINClUDE> to include the file which contains 
> this function in the application.cfm
> 
> When we call it like this(in javascript within a pair of 
> <CFOUTPUT>): <CFSILENT><CFSET 
> ct_out=GetString("jsPleasecheck", "Labels", "")></CFSILENT>
>         alert("#jsStringFormat(Ct_out)#");
> 
> It works  fine with all the three developer's local 
> machines(CFMX). However when the code was sent to QA, MX 
> complains that the variable CT_OUT is not defined. 
> Checkout the view source found out that the return value is 
> not resolved, the source code look like this: alert(" 
> CFRETURN stringvalue>
> 
> But if we put the entire function on the application.cfm 
> instead of in an included file it works OK. 
> 
> Does anybody knows why?
> 
> 
> Thanks.
> 
> 
> Sima 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to