Groups | Blog | Home
all groups > coldfusion flash integration > august 2005 >

coldfusion flash integration : Javascript from Flash Form?



Sequenzia
8/17/2005 7:36:44 PM
I would like to fire off a javascrpit from a flash form. I am not sure if this
is possible or if you have to do it with actionscript. Here is an example of
what I am doing:


<SCRIPT language="JavaScript">

function changecompany()
{
document.form1.company.value= "ABC Comp";

}

</script>

<cfform name="form1" method="get" format="flash">

<cfinput name="company" type="text">

<cfinput name="check1" type="checkbox" onclick="changecompany()">


</cfform


This works if I am not using the flash format.

Any help on this would be great. Thanks!

Chikowski
8/18/2005 12:00:00 AM
Use the <cfsavecontent> tag as a function.
For a few references take a look at www.asfusion.com and www.cfform.com.

Try:

<cfsavecontent variable="change_company">
document.company.text = "ABC Comp";
</cfsavecontent>

<cfform name="form1" method="post" format="flash">
<cfinput name="company" type="text">
<cfinput name="check1" type="checkbox" onclick="#change_company#">
</cfform>
Sequenzia
8/18/2005 12:00:00 AM
Thanks for your response!

So it looks like you can write standard javascript inside of the <cfsavecontent> tag? Am I correct in saying that?

Chikowski
8/18/2005 12:00:00 AM
Sequenzia
8/18/2005 12:00:00 AM
That makes sense.

AddThis Social Bookmark Button