How can I include all the scripts in a folder?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Haitashi
    New Member
    • Jun 2007
    • 96

    How can I include all the scripts in a folder?

    I've been using CFAJAXIMPORT to import all the scripts from CFIDE (which doesn't live in the site's root directory for recurity reasons). I need to include this folder to get things like CFWINDOW to work properly. I'm attaching how I've been trying to import all the scripts but I get an error when I use CFAJAXIMPORT. It says "Invalid usage of AJAX tag" "Use cfajaximport tag to specify SCRIPTSRC or make sure all ajax controls are inside a single cfform tag that has SCRIPTSRC". The leads me to think that CFAJAXIMPORT is not the correct way to load all the scripts from a specified directory. This how I call that CFAJAXIMPORT tag:
    Code:
    <cfajaximport scriptSrc="jslib/cfidescripts/cf8" />
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Are you using scriptSrc somewhere else within the same page, e.g. cfform? This may be the cause of the error.

    Comment

    • Haitashi
      New Member
      • Jun 2007
      • 96

      #3
      I figured out why. It wasn't being included somewhere else but cfajaximport tag must precede all other ColdFusion AJAX tags on the page*; that is, all tags that rely on the scripts.

      Since we are using a framework, I'm pretty sure that requirement is not being met properly.

      What I did was that I changed the default script directory from the CF management to point to this directory.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Glad you got it working.

        Comment

        Working...