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