You definitely need your /CFIDE/Scripts directory working properly as of CF8. In previous versions, if you weren't using CFFORM then you really didn't need the /CFIDE/Scripts directory, and many people don't have their virtual directories set up properly and don't even notice. Many shared hosting providers will actually disable the /CFIDE virtual directory as a security precaution (I can't even begin to count how many times I have answered the "Why doesn't my CFForm work?" question on various ColdFusion related forums).

In previous versions of ColdFusion the directory contains 2 files cfform.js and wddx.js. As of ColdFusion 8, the directory contains 1,887 files and 250 folders, and all the AJAX related functionalities require the folder to be accessible.

If you are one of those people who likes to hide what programming language you use, and you don't want to have the /CFIDE directory mapped, you can copy the /CFIDE/Scripts folder and all it's files into a directory off your web root named whatever you like. Let's say you put them in the /goober/Scripts folder. Then in the ColdFusion administrator go to the "Settings" page and set the "Default ScriptSrc Directory" setting to /goober/Scripts and you are good to go.

If you don't have access to the ColdFusion Administrator, you can still map it, but you have to specify the scripts folder in your code using the CFAjaxImport tag like:

<cfajaximport scriptsrc="/goober/Scripts">

If you go the CFAjaxImportroute, you need to make sure you place the CFAjaxImporttag before any other AJAX related tags in the template.

The CFForm tag, which relies on the /CFIDE/Scripts folder to function properly, also has a scriptsrc attribute that functions in the same way as the CFAjaxImport tags, so if CFForm is the only tag you are using in your template that needs to know the script folder, you don't need to use the CFAjaxImport tag.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
 
Home | Blog | Contact | © 2001 - 2022 The ColdFusion Guy - Scott Bennett. All rights reserved.