Okay, I found a solution that seems to work.  It's a total hack, and of course 
I can't guarantee that it will work for anyone else, but it so far seems to be 
working well for me with a very basic Flash Form.  I'll show the solution, then 
an explanation.

First and foremost, you'll have to copy the CFIDE/scripts folder from your dev 
or local machine.  The key is this: if it sits on the root of your site, you 
have to rename it something else.  I renamed mine _CFIDE.

Then, you'll have to add some code above and below your form.  Here is my 
sample code:

<!--- Code snippet starts --->

<cfsavecontent variable="_theForm">

<cfform name="theForm" format="Flash" width="300" height="200" accessible="yes">
<cfinput type="button" name="btn1" value="CLICK HERE" onClick="alert('The CFIDE 
hack works!')">
</cfform>

</cfsavecontent>

<cfoutput>#Replace(_theForm, "/CFIDE", "_CFIDE", "ALL")#</cfoutput>

<!--- Code snippet ends --->

Okay, so what does this all mean?  It appears that the issue with GoDaddy and 
FlashForms lies somewhere in the way that they handle the CFIDE directory.  As 
other have hinted, CFIDE contains all of the JavaScript and such that is needed 
to successfully get the form up and running.  A few times in development I have 
had problems because I forgot to create a virtual directory to point to CFIDE.  
So it makes sense that if I'm having problems with Flash Forms on GoDaddy, it 
must mean that CFIDE is missing.  So I can just upload my own CFIDE/scripts and 
I'll be on my way, right?

Wrong.  CFIDE already exists within your GoDaddy hosting account, but it 
doesn't work for forms in IE.  Why?  It's missing a file called 
CF_RunActiveContent.js.  Furthermore, simply uploading your own CFIDE/scripts 
will not work, because GoDaddy's servers will not recognize it.  Basically 
their version of CFIDE takes precedence over yours.  Bummer.

So what to do?  Well you've likely already read the solution above, which 
involes copying CFIDE/scripts and then renaming it.  In reality, all you need 
is CF_RunActiveContent.js, and by association, cfformhistory.cfm and 
cfformhistory.js.  With a little tweaking, you could whittle it down to just 
CF_RunActiveContent.js, but it adds a few characters to the solution code.  I 
digress.

So once you've put the files where the server can see them, all that is left to 
do is tweak the code that ColdFusion spits out.  This is the reason for the 
cfsavecontent and the cfreplace.  It basically allows you to tell ColdFusion 
that you want to change the output after it's processed.  In the resulting 
HTML, anything that refers to CFIDE/scripts gets changed to your version, 
_CFIDE/scripts, including the reference to CF_RunActiveContent.js.  Now able to 
see that file, IE puts on a big smile and renders your code, no questions 
asked.  Voila.

So why all this trouble?  What exactly is contained in this 
CF_RunActiveContent.js file that is so vital?  (This is the part that will piss 
you off.)  Here are the entire contents of CF_RunActiveContent.js:

<!--- Start file content --->
//v1.0  Copyright 2006 Adobe Systems, Inc. All rights reserved.
function CF_RunContent(src){document.write(src);}
<!--- End file content --->

All of this for a crappy little one-line function that does basically nothing?! 
 That's why I've been struggling with Flash Forms all this time?!

Those of you at the head of the class are wondering at this point, why can't we 
just replace the function CF_RunContent with document.write inside the Replace 
tag?  Wouldn't that save us the trouble of having to create our own version of 
the CFIDE directory?  The short answer is, yes you can, but you won't want to.

Why not?

Because Microsoft lost a lawsuit and wants to punish the world for it.  Google 
EOLA vs Microsoft for more on that.

Basically, if you take a shortcut and replace CF_RunContent with 
document.write, your form will display just fine, BUT...  It will have that 
irritating little border around it that says you have to click or hit the 
spacebar to start using the flash object.  I'm sure you've seen it, and it 
sucks.  Fortunately, the boys at Macromedia kick @$$ and were able to 
circumvent it when using Flash Forms.  The price?  A tiny little one-line file, 
entitled...  CF_RunActiveContent.js.

So that's the long (okay, very long) and the short of it.  For now, you can get 
around the GoDaddy/Flash Form bug with a fairly simple, albeit ugly, hack.

As for the days to come, I have a ticket in with GoDaddy, opened this morning.  
They've had to escalate it to their top guys a couple of times, which has 
yielded plenty of bogus feedback ("Just use FireFox instead").  I haven't heard 
anything for 4 or 5 hours now though, so who knows what the status might be.  
When I do hear back, I will suggest that they include that tiny but 
oh-so-important CF_RunActiveContent.js file in their CFIDE mappings.  Until 
then, hack on!

Josh Knopp
http://www.joshknopp.com/



>Anyone using GoDaddy and have Flash Forms running? I just loaded an app and
>my flash forms are not showing. I can look at the source and see that
>everything is there for Flash, but nothing shows up.
>http://www.daleprizes.com/index.cfm is the first page where the form should
>appear. I am working with their tech folks now but they are very slow to
>respond.
>
>Thanks,
>
>-- 
>Bruce Sorge
>
>"I'm a mawg: half man, half dog. I'm my own best friend!"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269389
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to