Hello CF coders,
I am new to coldfusion and it seems very nice to use. I used to be a PHP coder, but then switch last week because i like some of the things that CF has to offer. I am currently using Coldfusion 9 with Dreamweaver CS5. The one question i had, was how to use and reference a CFFunction with a CFM document. I have read some stuff, but im still lost. I know im not supposed to do this, but can someone just show me how to implement a CFFunction? So lets say this is _component.cfc
<cfcomponent>
<cffunction name="myFunction" access="public" returntype="string">
<cfargument name="myArgument" type="string" required="yes">
<cfset myResult="foo">
<cfreturn myResult>
</cffunction>
</cfcomponent>
Now what im lost is, if i have another page called _getcomponent.cfm, how do i call the function? Also, if i have an argument, does that mean that my function will look like this
<cfoutput>#myFunction('myArgument')#</cfoutput>
Im sorry, but again this is all new to me. Thanks for anyhelp that people my provide.
Fobos