>- see footer for list info -<
I tend to place all my functions in CFCs and then create them as
objects in the application scope in the onApplicationStart() event.
Then it is always available.

To be honest the overhead for including that function in yout
Application.cfm is so minimal I wouldn't bother with the cfif
statement.

You could try <cfif not isdefined("variables.XMLURL")>

On 9/29/05, dominic watson <[EMAIL PROTECTED]> wrote:
> >- see footer for list info -<
> I have a udf that I need to run accross practically all my pages (any
> page with an internal link). I am defining it in application.cfm like so:
>
> <cfif not isdefined('XMLURL')>
>     <cfscript>
>         function XMLURL(url) {
>             var resultString=URLSessionFormat(url);
>             resultString=ReplaceNoCase(resultString,"&","&amp;","ALL");
>             return resultString;
>         }
>     </cfscript>
> </cfif>
>
> Now, when I try to call the function in a page I get the error
> '*Variable xmlurl is undefined*'.
> I am using like this:
>
> <a href="#xmlurl(theURL)#">My link</a>
>
> Is there a way to make this function 'global' (or some other correct
> jargon)?
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to 
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
>


--
Simon Baynes
www.simonbaynes.com
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to