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

CFFILEUPLOAD - Javascript errors are being thrown

Community Beginner ,
Oct 21, 2010 Oct 21, 2010

We've just installed CF9 (with updater 1) on our new DEV box and I was going through the new features and am stumped on the CFFILEUPLOAD one.

I created a page and added this code

<cffileupload extensionfilter="jpg,jpeg,gif,png,bmp,tiff" name="portfoliofiles" maxfileselect="5" title="Portfolio Images" url="fileupload.cfm">

When I pull it up in the browser (FF3.6 or IE8), nothing shows up.  Nada.  I have the latest flash installed.  Using Firebug I can see that two javascript errors are actually being thrown:

Coldfusion is not defined: ColdFusion.Ajax.importTag('CFFILEUPLOAD');

and

  Coldfusion is not defined };ColdFusion.Event.registerOnLoad(_cf_fileupload_init_1287722891141);

I've seen several examples online (Camden, et al) and all examples show that just the line will pop the box.

What's the problem?

871
Translate
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
Community Beginner ,
Oct 21, 2010 Oct 21, 2010

Ah. Looking at the source I can see it's trying to load a bunch of stuff from /CFIDE/...

Since we run multiple sites on this box, have you guys just been mapping that directly as a virtual from the docroot?  Seems kludgy.

Translate
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 ,
Oct 22, 2010 Oct 22, 2010
LATEST

mikechy wrote:

Ah. Looking at the source I can see it's trying to load a bunch of stuff from /CFIDE/...

Since we run multiple sites on this box, have you guys just been mapping that directly as a virtual from the docroot?  Seems kludgy.

How is having a mapping to resources you want to use "kludgy"?  Is it because you don't think you should need to have to go and create the virtual directory in every site?  It's not like you'll need to do it any more than once...

You could also copy the relevant dir and use <cfajaximport> to point to it.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79fe.html

You'll still need to do this in each instance you want to use those resources, but at least that way it's in your code, not in your config, so only needs to be done once.

--

Adam

Translate
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