简体   繁体   中英

CF 11. 'ColdFusion is not defined' error using ColdFusion.Ajax.submitForm

Just re-installed everything on new laptop after old one crashed. Upgraded from CF9 to CF11 in the process. Running IIS on Windows 10. Local site is working fine, except when it comes to submitting a form with ajax.

ColdFusion.Ajax.submitForm('registerForm', '/register_action.cfm', callback,errorHandler);
  • I have <cfajaximport> at the top.
  • I have an IIS virtual CFIDE directory pointing to C:\\ColdFusion2016\\cfusion\\wwwroot\\CFIDE
  • Mapping in CFAdmin is correct

There was not issue with CF9. But I notice CF11 has its scripts directory OUTSIDE the CFIDE directory on the same level (directory named "cf_scripts"), whereas CF9 has the scripts INSIDE the CFIDE directory.

Before I stuff things up, has anyone any pointers in the right direction?

SOLUTION

For the benefit of others, I did the following:

  • CFAdministrator Default ScriptSrc directory: /CF_SCRIPTS
  • IIS Virtual Directory: CF_SCRIPTS pointing to C:\\ColdFusion2016\\cfusion\\wwwroot\\cf_scripts\\scripts\\

Create a virtual directory in IIS that points to that scripts folder.

In the ColdFusion administrator, under the Server > Settings tab, make sure the Default ScriptSrc Directory name matches the IIS virtual directory name you created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM