JeffHobbs
07-16-2003, 12:28 AM
I am trying to create a email form using flash remoting. I have created a component:
<cfcomponent name = "confidentialMail">
<cffunction access="remote" name="sendMail" returntype="string" displayname="Confidential Email" hint="Confidential email">
<!---"message" will be a function in the flash movie --->
<cfargument name="message" type="string" required="true" displayname="Message" hint="Message">
<!--Send mail, based on flash input-->
<CFMAIL
TO="EmailAddress"
FROM="Confidential Intranet Email<emailAddress>;"
SUBJECT="INTRANET: Confidential Feedback" type="html"
>
#message#
</CFMAIL>
<cfreturn "Your email has been sent! Thanks for the input">
</cffunction>
</cfcomponent>
Furthermore, I have been using Lott's book for guidance on the Flash side of things. Here is what I have thus far in ActionScript:
#include "NetServices.as"
// uncomment this line when you want to use the NetConnect debugger
//#include "NetDebug.as"
// From Lott's book - Page 190
function init() {
var gwURL = "http://pw-gisweb/flashservices/gateway/";
NetServices.setDefaultGatewayURL(gwURL);
conn = NetServices.createGatewayConnection();
// create the service object - use to reference .cfc
_root.srv = conn.getService("dpw.mail.confidentialMail", this);
}
// when the button is released, call the
// confidentialMail.cfc component and pass it the email message
sendMailBtn.onRelease = function() {
// call the cfc
_root.srv.sendMail(_root.message);
trace("Button pushed");
};
// initialize the movie
init();
The current error I am getting is NetServices info 2: sendMail_Status was received from server: Service threw an exception during method invocation: The parameter MESSAGE to function sendMail is required but was not passed in.
I understand that MESSAGE is required in my component. I want it this way. I am thinking this is because I am NOT addressing the #message# variable at all in my Actionscript.
Does anybody have any ideas here?
Thanks!
Jeff Hobbs
<cfcomponent name = "confidentialMail">
<cffunction access="remote" name="sendMail" returntype="string" displayname="Confidential Email" hint="Confidential email">
<!---"message" will be a function in the flash movie --->
<cfargument name="message" type="string" required="true" displayname="Message" hint="Message">
<!--Send mail, based on flash input-->
<CFMAIL
TO="EmailAddress"
FROM="Confidential Intranet Email<emailAddress>;"
SUBJECT="INTRANET: Confidential Feedback" type="html"
>
#message#
</CFMAIL>
<cfreturn "Your email has been sent! Thanks for the input">
</cffunction>
</cfcomponent>
Furthermore, I have been using Lott's book for guidance on the Flash side of things. Here is what I have thus far in ActionScript:
#include "NetServices.as"
// uncomment this line when you want to use the NetConnect debugger
//#include "NetDebug.as"
// From Lott's book - Page 190
function init() {
var gwURL = "http://pw-gisweb/flashservices/gateway/";
NetServices.setDefaultGatewayURL(gwURL);
conn = NetServices.createGatewayConnection();
// create the service object - use to reference .cfc
_root.srv = conn.getService("dpw.mail.confidentialMail", this);
}
// when the button is released, call the
// confidentialMail.cfc component and pass it the email message
sendMailBtn.onRelease = function() {
// call the cfc
_root.srv.sendMail(_root.message);
trace("Button pushed");
};
// initialize the movie
init();
The current error I am getting is NetServices info 2: sendMail_Status was received from server: Service threw an exception during method invocation: The parameter MESSAGE to function sendMail is required but was not passed in.
I understand that MESSAGE is required in my component. I want it this way. I am thinking this is because I am NOT addressing the #message# variable at all in my Actionscript.
Does anybody have any ideas here?
Thanks!
Jeff Hobbs