• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I include all the scripts in a folder?

New Here ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

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:
TOPICS
Advanced techniques

Views

363

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

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/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation