2 Replies Latest reply on Mar 12, 2008 9:07 AM by Gigi_

    How can I include all the scripts in a folder?

    Gigi_ Level 1
      I've been using CFAJAXIMPORT to import all the scripts from CFIDE. 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:
        • 1. Re: How can I include all the scripts in a folder?
          Level 7
          here's from the cfml reference:

          quote:


          scriptSrc attribute:

          Specifies the *URL, relative to the web root*, of the directory that
          contains the client-side script files used by ColdFusion. This directory
          includes the JavaScript files and the default location of the CSS files
          used for all AJAX features.

          If you use this attribute, the *cfajaximport tag must precede all other
          ColdFusion AJAX tags on the page*; that is, all tags that rely on the
          scripts.

          *You can have only one scriptsrc attribute on a page*, in a cfajaximport
          tag or a cfform tag. You can use a scriptsrc attribute in a cfajaximport
          tag to apply its value to all forms on a page.



          make sure you meet all 3 conditions marked with * *.

          hth

          Azadi Saryev
          Sabai-dee.com
          http://www.sabai-dee.com/
          • 2. Re: How can I include all the scripts in a folder?
            Gigi_ Level 1
            quote:

            If you use this attribute, the *cfajaximport tag must precede all...


            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.