Gotcha, would it be better to put these UDFs in CFCs and then instantiate
them on Application.CFC?
Ravi.
On Mon, Apr 14, 2008 at 10:22 AM, Dominic Watson <
[EMAIL PROTECTED]> wrote:
> >
> > Where would I place these UDFs so that whenever I needed them I
> > could just call the function?
>
>
> Yeh, I often use UDFs for this kind of thing where I want to use cfscript
> but there is the odd tag I need to use but I doubt you'd ever get a google
> result for this kind of thing.
>
> For UDFs, I usually create a folder in my project called '_udfs' and have
> a
> single cfm file for each udf. Then, in the page that needs to use the udf,
> just include the file. So:
>
> <cfinclude template="/_udfs/scriptLocation.cfm">
> <cfscript>
> switch(cgi.http_host) {
> case 'www.brightWebWorks.com <http://www.brightwebworks.com/>':
> scriptLocation('brightWebWorks.com/');
> break;
> ....
> }
> </cfscript>
>
> Dominic
>
> --
> Blog it up: http://fusion.dominicwatson.co.uk
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303300
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4