Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Remoting

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-16-2003, 12:28 AM   #1
JeffHobbs
Registered User
 
Join Date: Jun 2003
Posts: 13
Default Flash Remoting CFMAIL

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:

ActionScript Code:
#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
Quote:
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
JeffHobbs is offline   Reply With Quote
Old 07-16-2003, 12:47 AM   #2
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

What is _root.message? Is it a text field? is message the instance name? If so, it should be _root.message.text. Unless of course I am missing something else here.
freddycodes is offline   Reply With Quote
Old 07-16-2003, 12:55 AM   #3
JeffHobbs
Registered User
 
Join Date: Jun 2003
Posts: 13
Default

THAT DID IT!!!

Thanks... I'm glad another pair of eyes worked here!

Jeff
JeffHobbs is offline   Reply With Quote
Old 07-16-2003, 01:01 AM   #4
JeffHobbs
Registered User
 
Join Date: Jun 2003
Posts: 13
Default

Any ideas now on how to capture carriage returns? In other words, if the text box has <returns> in them, I want those returns represented in the email. My text box is INPUT TEXT, MULTI-LINE, SELECTABLE, and RENDER TEXT AS HTML.

Thanks!

Jeff
JeffHobbs is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.