How to make user defined function global?

Thread Solved

Join Date: Jun 2009
Posts: 13
Reputation: fayola is an unknown quantity at this point 
Solved Threads: 0
fayola's Avatar
fayola fayola is offline Offline
Newbie Poster

How to make user defined function global?

 
0
  #1
Jun 19th, 2009
Hi again,
Okay now I have a Coldfusion question, I have written a user defined function in coldfusion:
  1. <cfscript>
  2. function isSqlInjection(str) {
  3. ....
  4. }
  5. </cfscript>

Now I am a complete newbie to coldfusion and don't want to have to include this function in every page when I have to do this validation, but would rather have this as a global function to the whole application.
I've inherited this project so not completely 100% on how this application is set up, but if I can get an idea where to place this code to make it global that would be great.

I noticed an _app.cfm file that had some default values assigned and tried placing the function in this file, but that did not work.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 13
Reputation: fayola is an unknown quantity at this point 
Solved Threads: 0
fayola's Avatar
fayola fayola is offline Offline
Newbie Poster

Re: How to make user defined function global?

 
0
  #2
Jun 19th, 2009
Ah nevermind I found the Application.cfm file and placing the function in this file made it accessible. Marking as sovled!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC