I'm submitting the contents of a flash cfform to the database via a cfc
and I want to reset the form when I get a positive result back from the
cfc. The code below shows the call to the cfc and the call to reset the
form. I know that the resetForm() gets called because I put an alert in
with the resetForm() call to make sure I got there, but the form doesn't
get reset. I have a feeling its something to do with the context of the
call, but I'm not sure what.
I'm beyond tired at the minute, so forgive me if I've missed something
obvious and thank you in advance for the help.
Regards
Stephen
<cfsavecontent variable="sendOrder">
<cfoutput>
//create connection
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("http://#cgi.SERVER_NAME#/flashservices/gateway");
//declare service
var myService:mx.remoting.NetServiceProxy;
var responseHandler = {};
var AccountNo = '#session.User.AccountNo#';
var dsn = "#request.DSN#";
var DeliveryAddressID = DeliveryAddress.selectedItem.data;
var OrderEmailAddress = '#request.OrderEmail#';
</cfoutput>
responseHandler.onResult = function( results: Object ):Void {
//when results are back, populate the cfselect
alert(results.errormessage);
if (results.ordersent) {
// order sent successfully so reset the form
alert('reset here');
resetForm();
}
}
responseHandler.onStatus = function( stat: Object ):Void {
//if there is any error, show an alert
alert("Error while calling cfc:" + stat.description);
}
//get service
myService = connection.getService("wms05.orders.OrderForm",
responseHandler );
//make call
myService.sendOrder(dsn,AccountNo,cart.dataProvider,CarriageID.text,DeliveryAddressID,ContactName.text,ContactTel.text,CustomerOrderNo.text,DeliveryNotes.text,OrderEmailAddress);
</cfsavecontent>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216993
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54