this is what I got so far:
<cfsavecontent variable="checkValues">
if (emp_NAMEa.text == '')
{
mx.controls.Alert.show('Employee Name is required!');
}
else if (FTa.text == '')
{
mx.controls.Alert.show('Employee Status is required!');
}
else if (TITLEa.text == '')
{
mx.controls.Alert.show('Employee Title is required!');
}
else if (DM_NAMEa.text == '')
{
mx.controls.Alert.show('District Manager Name is
required!');
}
else if (DOHa.text == '')
{
mx.controls.Alert.show('Date of Hire is required!');
}
else if (SVC_MGR_NAMEa.text == '')
{
mx.controls.Alert.show('Service Manager Name is required!');
}
else
{
var responseHandler = {};
//function that receives the response
responseHandler.onResult = function( results: Object ):Void
{
//when results are back, we show the text received
responseHandler.text = results;
}
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("
http://#cgi.HTTP_HOST#/flashservices/gateway/");
//declare service
var myService:mx.remoting.NetServiceProxy;
//create load variables
var formData = {};
//add the input text to loadvars
formData.emp_NAMEa = emp_NAMEa.text;
formData.FTa = FTa.text;
formData.TITLEa = TITLEa.text;
formData.DM_NAMEa = DM_NAMEa.text;
formData.DOHa = DOHa.text;
formData.SVC_MGR_NAMEa = SVC_MGR_NAMEa.text;
formData.Send("
http://stericycleweb.com/cfc/add_emp.cfm",
formData, "post");
}
</cfsavecontent>