Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Can a .as be executed in CF8

0 views
Skip to first unread message

-==cfSearching==-

unread,
Dec 17, 2008, 11:10:16 PM12/17/08
to
IIRC you can use the import and #include directives using cfformitem type="script" and/or cfsavecontent. Though I do not know if either is "officially" supported with cfforms.

IamTrip

unread,
Dec 18, 2008, 12:20:23 PM12/18/08
to
I've tried a few ways of calling

<cfformitem type="script">##include "globalstyle.as";</cfformitem>
<cfformitem type="script">include "globalstyle.as";</cfformitem>

I hate to ask, but I can't seem to find this out anywhere. Could you point me
in the direction of a "how to" for this? Thanks for your time!

-==cfSearching==-

unread,
Dec 18, 2008, 3:34:57 PM12/18/08
to
Sure. (I am not, by any means, an expert on this ;-) But here is an extremely
simple example using #include.

<!---
SomeFile.as (located in same directory as cfm script)
--->
function doStuff():String
{
return "You called function doStuff()";
}


<!---
CFFORM code
--->
<cfform name="testForm" format="flash">
<cfformitem type="script">
#include "SomeFile.as"
</cfformitem>
<cfinput type="button" name="testButton" value="Test"
onClick="alert(doStuff());">
</cfform>


-==cfSearching==-

unread,
Dec 18, 2008, 3:39:07 PM12/18/08
to
BTW, I would also recommend you check out asfusion.com. Though many of the
newer articles are on Flex, they still have some amazing entries and examples
for cfform

http://www.asfusion.com/examples/


IamTrip

unread,
Dec 18, 2008, 3:39:19 PM12/18/08
to
Thank you so much for responding!!
0 new messages