Try doing a CFDUMP of the various scopes (starting with VARIABLES) to see if you're function is there. Are you possibly setting the variable 'replaceHTML' somewhere in the code? that'll overwrite the function definition. I remember beating my head against that wall for hours when CF5 first came out.
HTH, barneyb > -----Original Message----- > From: Scott Brady [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 18, 2003 4:27 PM > To: CF-Talk > Subject: UDF not being recognized > > > I must be losing my mind, because this is really simple, but . . . . > > I'm writing a UDF with cffunction in a functions page I've > cfiincluded into > a template, but when I try to call the function, CF doesn't recognize the > function. If I put the cffunction inline in the template, it does. > > Here's the code from the functions page (yes, I know all I'm > doing so far is > returning the exact same string): > <cffunction name="replaceHTML" returntype="string"> > <cfargument name="theString" required="true"> > > <cfset newString = theString> > <cfreturn newString> > </cffunction> > <!--- alert box just to make sure file is loaded ---> > <script type="text/javascript">alert(2);</script> > > > Here's the code calling the function: > <cfset variables.contentNoHTML = replaceHTML(attributes.content)> > > When I run this page, I get the javascript alert(2); so I know > the function > page is loading. But, I also get an error saying that "replaceHTML" is > undefined. > > (Since I'm used to doing UDFs with cfscript, I converted it to a cfscript > UDF and got the same result) > > So, what's the embarassingly obvious thing I missed? > > Scott > ------------------------------------------- > Scott Brady > http://www.scottbrady.net > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

