Advertisement

07.24.2008 at 07:11AM PDT, ID: 23592123
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Sending Email Form Variables to ASP server in AS3 w/ Combo Boxes, Text Fields and Check Boxes

Asked by rarid1224 in Macromedia Flash, Adobe Flex, ActionScript

Tags: , ,

I want to send form information to an ASP server using ActionScript 3. My fields are text boxes, check boxes, and drop down menus for birthday, date and year. I am not sure of the syntax for getting the data from the components and sending them to the server. Can you review my code and alert me of errors?

the combo box instance names are birthMonth, birthDay, and birthYear

the check box instance names are gender1, gender2, interestedYes, interestedNo, contactedYes, contactedNoStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
stop();
 
var address1:String = "http://borregoservername/";
var url:URLRequest;
var variables:URLVariables = new URLVariables();
variables.subject = "Information sent from Borrego Flash Form"
variables.recipient = "you@yourdomain.com";
 
submit_btn2.addEventListener(MouseEvent.CLICK, submitInfo);
submit_btn2.buttonMode = true;
 
function submitInfo(Event:MouseEvent):void
{
	variables.firstname = firstName.text;
	variables.lastname = lastName.text;
	variables.address = address.text;
	variables.apt = apt.text;
	variables.email = email.text;
	variables.city = city.text;
	variables.state = state.text;
	variables.zip = zip.text;
	variables.phone = phone.text;
	variables.birthMonth = birthMonth.text;
	variables.birthDay = birthDay.text;
	variables.birthYear = birthYear.text;
	variables.male = gender1.selected;
	variables.female = gender2.selected;
	variables.acquire = acquire.text;
	variables.interestedYes = interestedYes.selected;
	variables.interestedNo = interestedNo.selected;
	variables.dealerContactYes = contactedYes.selected;
	variables.dealerContactYes = contactedNo.selected;
	
	url = new URLRequest(address1);
	url.method = URLRequestMethod.POST;
	url.data = variables;
	navigateToURL(url);
	gotoAndStop("process");
}
 
interestedYes.selected;
 
 
if(interestedYes.selected)
	{
	interestedNo.selected = false;
	}
	else(interestedNo.selected)
	{
	interestedYes.selected = false;
	}
	
interestedYes.addEventListener(MouseEvent.CLICK, checkbox);
interestedNo.addEventListener(MouseEvent.CLICK, checkbox2);
 
	
function checkbox (event:MouseEvent):void
{
	interestedYes.selected = true;
	interestedNo.selected = false;
}
 
function checkbox2 (event:MouseEvent):void
{
	interestedYes.selected = false;
	interestedNo.selected = true;
}
 
 
contactedYes.addEventListener(MouseEvent.CLICK, contact);
contactedNo.addEventListener(MouseEvent.CLICK, contact2);
 
	
function contact (event:MouseEvent):void
{
	contactedYes.selected = true;
	contactedNo.selected = false;
}
 
function contact2 (event:MouseEvent):void
{
	contactedYes.selected = false;
	contactedNo.selected = true;
}
Attachments:
 
picture of stage with form
picture of stage with form
 
[+][-]07.24.2008 at 11:12PM PDT, ID: 22086299

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 11:13PM PDT, ID: 22086305

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 11:18PM PDT, ID: 22086321

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 11:19PM PDT, ID: 22086325

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Macromedia Flash, Adobe Flex, ActionScript
Tags: Adobe, Flash CS3, ActionScript 3.0
Sign Up Now!
Solution Provided By: hobbit72
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628