By default, ColdFusion does the following:
In some cases you must override these default behaviors.
In some situations, you cannot use the default location for the CFIDE directory, often because a hosting site blocks access to it to prevent access to the ColdFusion Administrator. Then you must move the CFIDE/scripts directory, or the subdirectories that you use in your applications, to a different location.
In other situations, you might have custom versions of some of the client-side files, such as the CSS files that specify form control appearance, that apply only to certain applications.
In both situations, you must inform ColdFusion of the new location. You can specify the location of either or both directories containing the following files:
Specifying the client-side resource location
You can use any of the following techniques to control the location of the directory that contains the client-side resources required by the ColdFusion Ajax features:
You must be careful if you require multiple resource locations for a single page. Each JavaScript file is imported only once on a page, the first time it is required. Therefore, you cannot use different copies of one JavaScript file on the same page.
To prevent problems, ColdFusion generates an error if you specify more than one scriptsrc attribute on a page. Therefore, if multiple forms require custom client-side resource files, you must specify their location in a single cfajaximport tag, not in scriptsrc attributes in the cfform tags.
Specifying the CSS file location
You can use the cfajaximport tag cssSrc attribute to specify the location of a directory that contains only the CSS files that control the style of ColdFusion Ajax-based controls. This attribute overrides any scriptsrc value in determining the CSS file location. Therefore, you could use the CSS files in the scriptsrc directory tree for most pages, and specify a cssSrc attribute on selected application pages that require a custom look.
For detailed information on how to use the scriptsrc and cssSrc attributes, and requirements for the contents of the specified directory, see the cfajaximport tag in the CFML Reference.
In the following situations, ColdFusion does not automatically import the JavaScript files that are required for Ajax-based tags:
For detailed information on importing tag-specific JavaScript files, see the cfajaximport tag in the CFML Reference.