• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Inserting data into SQL throguh CF flash forms

Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

I have a multi tab form and I need to insert data into an SQL database but I can only one submit button, because if I have multiple then the actual validations for the tab forms get in the way os submiting each other, so I wanted to use the flash remote option through a coldfusion component to pass the data to the DB, my issue is that I have no clue as to how to do this (do not know ActionScript) can anyone point me to a web site or some where I can find some sample code. I have found tons of articles of how to insert or pass data to FLash, but what I'm looking for is how to pass data into a coldfusion form and back, and yes I have tried the site called ASFusion, there they only show how to retrieve the information not insert. If any one can help please let me know, thanks.
TOPICS
Advanced techniques

Views

302

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Learn ActionScript.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

I would say it's more Flex than action script since some of the methods used in action script will not always work on colfusion forms. So it's not a matter of knowing or learning action script, it's a matter of someone pointing me in the right direction. But thanks for your response it was very informative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

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://www.stericycleweb.com/cfc/add_emp.cfm", formData, "post");

}
</cfsavecontent>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation