I'm not sure how efficient this is, but it works:

HTH,

Sam

----------------------------------------------
Blog:  http://www.rewindlife.com
Chart: http://www.blinex.com/products/charting
----------------------------------------------

<!--- DummyComponent.cfc --->
<cfcomponent>
</cfcomponent>

<!--- DynamicCaller.cfm --->

<cfscript>

function addTwoThings(firstThing, secondThing) {
return firstThing + secondThing;
}

functionName = "addTwoThings";
functionArgs = StructNew();
functionArgs.firstThing = 1;
functionArgs.secondThing = 2;

dummy = createObject("component", "DummyComponent");
dummy[functionName] = variables[functionName];

</cfscript>

<cfinvoke
   component="#dummy#"
   method="#functionName#"
   argumentCollection="#functionArgs#"
   returnVariable="r">

<h1><cfoutput>#r#</cfoutput></h1>

>-----Original Message-----
>From: Sparrow-Hood, Walter [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 21, 2003 4:56 PM
>To: CF-Talk
>Subject: dynamic function call
>
>I am dynamically calling functions on a page using the following:
>
><cfscript>
> evaluate("#event#(#argumentList#)");
></cfscript>
>
>I've tried every combination I can think of to eliminate the evaluate
>function but nothing works.  Anybody have any ideas??
>
>Walt
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to