Adobe COLDFUSION 9 Manual page 885

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Specifying a custom script or CSS location
In some situations, you cannot use the default location for the CFIDE directory, because a hosting site blocks access to
it to prevent access to the ColdFusion Administrator. Then, move the CFIDE/scripts directory, or the subdirectories
that you use in your applications, to a different location.
In other situations, you 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, inform ColdFusion of the new location. Specify the location of either or both directories containing
the following files:
• All client-side resources required by the ColdFusion Ajax features
• Only the CSS files required by the ColdFusion Ajax features
Specify the client-side resource location
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:
• If the ColdFusion client-side files required by all applications, including the files used by
location, you specify the directory in the ColdFusion Administrator > Server Settings > Settings page, Default
CFFORM ScriptSrc Directory field. The directory you specify and its subdirectories must have the same structure
and contents as the CFIDE/scripts directory tree.
• If the client-side files required for Ajax features on a specific page are in one location, you use the
tag
attribute to specify the source directory. This tag overrides the setting in the administrator, and does
scriptsrc
not affect the files used for standard
the same structure and contents as the CFIDE/scripts/ajax directory tree.
• You specify the client-side source directory for a specific form in the
overrides any
cfajaximport
subdirectories must have the same structure and contents as the CFIDE/scripts directory tree.
If you require multiple resource locations for a single page, make sure that 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
Therefore, if multiple forms require custom client-side resource files, specify their location in a single
tag, not in
attributes in the
scriptsrc
Specify the CSS file location
Use the
tag
cfajaximport
cssSrc
control the style of ColdFusion Ajax-based controls. This attribute overrides any
CSS file location. Therefore, you could use the CSS files in the
attribute on selected application pages that require a custom look.
cssSrc
For detailed information on how to use the
the specified directory, see the cfajaximport tag in the CFML Reference.
features. The directory you specify must have an ajax subdirectory with
cfform
tag setting for the form and its child controls. The directory you specify and its
tags.
cfform
attribute to specify the location of a directory that contains only the CSS files that
and
scriptsrc
cssSrc
Last updated 8/5/2010
tag
cfform
scriptsrc
scriptsrc
scriptsrc
directory tree for most pages, and specify a
scriptsrc
attributes, and requirements for the contents of
tags are in a single
cfform
cfajaximport
attribute. This setting
attribute on a page.
cfajaximport
value in determining the
880

Advertisement

Table of Contents
loading

Table of Contents