CFForm “Object Expected” Error

Helping a friend the other day, I discovered some quirkiness in using CFForm in a hosted environment. Now, if you have not gotten used to using CFForm in a hosted environment already… here a little bit of advice.
Copy the entire CFIDE/scripts directory into your site. Second, add the scriptSrc attribute to the CFForm tag that maps to the location of the CFIDE/scripts/cfform.js. By adding the mapping and these files into your site, the JavaScript that CFForm generates will be able to find the files it is looking for.
Now for the quirkiness. I noticed that even though I had copied all the files to the hosted site and I had added the scriptSrc attribute to my CFForm, not all of the generated JavaScript was mapped correctly.
The trick was to make sure to keep the exact same directory structure “CFIDE/scripts”.
In the end, my form looked like this:

<cfform method=”post” name=”myForm” format=”flash” scriptSrc=”CFIDE/scripts/cfform.js”>

And my directories looked like this:
– scripts
… and all the other files

About Rob Rusher

In his role as Principal Consultant for On3, Rob leads an software development practice to help his clients build rich Internet applications for the desktop, browser, and mobile devices, and to rapidly increase their knowledge and skills to better support their organization's goals. Rob is an Adobe Certified Expert, Community Professional, and Certified Instructor. He has taught and mentored the technical teams at HP, Overstock, Paychex, SAS, the FedEx, and other Government and Fortune 100 organizations. Rob has co-authored four best-selling books on building secure, cutting-edge and rapidly developed applications using Adobe AIR, ColdFusion and Flex. He is very active in organizing and speaking at RIA, Adobe LiveCycle, mobile conferences, and user groups. In addition to growing his software consulting practice, On3, Rob has been building expertise in rich client application development on a wider variety of devices and platforms that extend the applications to change the way we all create and live.