[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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!

7.8

Email form in Flash ActionScript 3 and godaddy's gdform.asp

Asked by scherkey52 in Adobe Flash, Active Server Pages (ASP), SendMail Email Server

Tags: flash cs4, as3, email form, godaddy, asp

Hello
I recently started designing a few websites for friends and family. And i always had a problem with email forms. The only form I found working on godaddy hosting accounts was gdform.asp . I created a flash website and I am trying to integrate a email form. I attached the email form I am using. It uses send_email.php to send emails, but in the comments I read I just need to link it to an asp file with the same name. So I renamed godaddy's gdform.asp to send_email.asp and changed the appropiate code in flash. But it wont work, I greatly appreciate any input on this problem.
I did not create any of the files in this attachment. I downloaded them in a free template.
EE will not allow me to upload the files. So I pasted the as3 code.
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:
contact_name.text = contact_email.text = contact_subject.text = 
contact_message.text = message_status.text = "";
 
send_button.addEventListener(MouseEvent.CLICK, submit);
reset_button.addEventListener(MouseEvent.CLICK, reset);
 
var timer:Timer;
var var_load:URLLoader = new URLLoader;
var URL_request:URLRequest = new URLRequest( "send_email.php" );
URL_request.method = URLRequestMethod.POST;
 
function submit(e:MouseEvent):void
{
	if( contact_name.text == "" || contact_email.text == "" ||
		contact_subject.text == "" || contact_message.text == "" )
	{
		message_status.text = "Please fill up all text fields.";
	}
	else if( !validate_email(contact_email.text) )
	{
		message_status.text = "Please enter the valid email address.";
	}
	else
	{
		message_status.text = "sending...";
		
		var email_data:String = "name=" + contact_name.text
					   + "&email=" + contact_email.text
					   + "&subject=" + contact_subject.text
					   + "&message=" + contact_message.text;
					   
		var URL_vars:URLVariables = new URLVariables(email_data);
		URL_vars.dataFormat = URLLoaderDataFormat.TEXT;
		
		URL_request.data = URL_vars;
		var_load.load( URL_request );
		var_load.addEventListener(Event.COMPLETE, receive_response );
	}
}
 
function reset(e:MouseEvent):void
{
	contact_name.text = contact_email.text = contact_subject.text = 
	contact_message.text = message_status.text = "";
}
 
function validate_email(s:String):Boolean 
{
	var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
	var r:Object = p.exec(s);
	if( r == null ) 
	{
		return false;
	}
	return true;
}
 
function receive_response(e:Event):void
{
	var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
	
	if( email_status == "yes" )
	{
		message_status.text = "Success! Your message was sent.";
		timer = new Timer(500);
		timer.addEventListener(TimerEvent.TIMER, on_timer);
		timer.start();
	}
	else
	{
		message_status.text = "Failed! Your message cannot sent.";
	}
}
 
function on_timer(te:TimerEvent):void 
{
	if( timer.currentCount >= 10 )
	{
		contact_name.text = contact_email.text = contact_subject.text = 
		contact_message.text = message_status.text = "";
		timer.removeEventListener(TimerEvent.TIMER, on_timer);
	}
}
[+][-]08/20/09 12:26 PM, ID: 25146127Accepted Solution

View this solution now by starting your 30-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: Adobe Flash, Active Server Pages (ASP), SendMail Email Server
Tags: flash cs4, as3, email form, godaddy, asp
Sign Up Now!
Solution Provided By: scherkey52
Participating Experts: 2
Solution Grade: A
 
[+][-]08/03/09 06:49 AM, ID: 25004245Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/03/09 09:32 AM, ID: 25005986Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/03/09 12:41 PM, ID: 25007918Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08/03/09 01:48 PM, ID: 25008497Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/09 06:45 AM, ID: 25054195Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625