The bit I missed was this, you need this function exactly as is within your application.cfc

 

      <cffunction name="onRequest" returnType="void" output="true">

            <cfargument name="targetPage" type="string" required=true/>

            <cfinclude template="#arguments.targetPage#">

      </cffunction>

 

Regards
Dale Fraser


From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Tom MacKean
Sent: Monday, 3 July 2006 09:58 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Includes

 

Doesn't work for me.

 

Variable MAXFUNC is undefined.

 

Tom

 

On 6/30/06, Max <[EMAIL PROTECTED]> wrote:



Dale Fraser wrote:
> Yep I saw it to which lead me to conclude that it cant be done.
>
>
>
> Regards
> Dale Fraser
>

On the contrary - Not only could it be done, it's actually quite easy.

Just add you function to Application.cfc:
<cfcomponent>
<!--- All your onApplicationStart/End, onSessionStart/End,
onRequestStart/End, etc, etc. --->

<cffunction name="maxFunc" output="false" returnType="string"
access="public" hint="">
       <cfargument name="str" type="string" required="true" />
       <cfset var returnStr = "ReturnVal: " & arguments.str />
       <cfreturn returnStr />
</cffunction>

</cfcomponent>


Call you function from any .cfm page:
Hello Max<br>
<cfdump var="#maxFunc('Well Hello Back!')#">


That should work just fine.


Have a good weekend everyone,
Max

p.s.
FYI: The function could even have access set to "private" and it would
still work



--
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social fauxpas. No animals were harmed in the transmission of this email, although the mutt next door is living on borrowed time, let me tell you.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to