Question
Flash remoting
Hello,
I would like to get a variable back using flash remoting. Below is the code I am using :
Action script :
.cfc :
.cfm :
Serveur connexion works, but I get an error stating that the variable is not defined.
Thank you for your help.
I would like to get a variable back using flash remoting. Below is the code I am using :
Action script :
#include "NetServices.as"
if(inited == null)
{
inited=true;
NetServices.setDefaultGatewayUrl(" http://localhost:8500/flashservices/gateway");
var connexion = NetServices.createGatewayConnection();
var myservice = connexion.getService("com.macromedia.test.toto", this);
myservice.toto({param1:1002});
}
.cfc :
<cfcomponent>
<cffunction name="toto" returnType="numeric" access="Remote">
<cfargument name="param1" type="numeric" required="yes">
<cfreturn param1>
</cffunction>
</cfcomponent>
.cfm :
<cfoutput>
<cfinvoke component="com.macromedia.test.toto" method="toto" returnvariable="valeur">
#valeur#
</cfoutput>
Serveur connexion works, but I get an error stating that the variable is not defined.
Thank you for your help.