Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-31-2012, 04:09 PM   #1
oOPurple_HazeOo
Member
 
Join Date: Apr 2010
Posts: 96
Question asp contact form

PLEASE can somebody tell me how to do this...
I've searched everywhere and can't find anything that works.
I have made my contact form in flash but now sending the information to he .asp file to send the email I'm stumped with.

Here is my as:

ActionScript Code:
InteractiveObject(theName.getChildAt(1)).tabIndex = 1; InteractiveObject(theSurname.getChildAt(1)).tabIndex = 2; InteractiveObject(theCompany.getChildAt(1)).tabIndex = 3; InteractiveObject(theNumber.getChildAt(1)).tabIndex = 4; InteractiveObject(theEmail.getChildAt(1)).tabIndex = 5; InteractiveObject(theComment.getChildAt(1)).tabIndex = 6; send_btn.addEventListener(MouseEvent.CLICK, sendClicked); function sendClicked(event:MouseEvent):void {     if (theName.text == "" || theSurname.text == "" || theCompany.text == "" || theNumber.text == "" || theEmail.text == "" || theComment.text == "" )     {         theError.text = "Please fill in all fields"     }         else     {                 //variable container         var allVars:URLVariables = new URLVariables ();         allVars.name = theName.text;         allVars.surname = theSurname.text;         allVars.company = theCompany.text;         allVars.number = theNumber.text;         allVars.email = theEmail.text;         allVars.comment = theComment.text;                 //send info to URL         var mailAddress:URLRequest = new URLRequest ("http://www.mydomain.co.za/sendMail.asp");         mailAddress.data = allVars;         mailAddress.method = URLRequestMethod.POST;         sendToURL (mailAddress)         theError.text = "Thank You!";         theName.text = "";         theSurname.text = "";         theCompany.text = "";         theNumber.text = "";         theEmail.text = "";         theComment.text = "";     }     }

The as is right i think?
But now how the heck to I make the asp file??? Please help i've really looked everywhere and nothing is working...
oOPurple_HazeOo is offline   Reply With Quote
Old 05-31-2012, 04:14 PM   #2
abeall
Senior Member
 
Join Date: Feb 2006
Location: Washington, DC
Posts: 2,796
Send a message via AIM to abeall
Default

Yeah the AS3 looks like it should work, although instead of sendToURL I would use a URLLoader so you can listen for complete/failure.

As for the ASP, well this is an AS3 forum so you'd be better posting on an ASP forum... or just researching, seeing as this is pretty basic. Look here:

http://www.tizag.com/aspTutorial/aspFormsEmail.php

You would use the "tizagEmail.asp" sample script, only use your variable names for the Request.Form() method calls.
__________________
Aaron Beall | Flash portfolio | Fireworks extensions | Twitter
abeall is offline   Reply With Quote
Old 06-01-2012, 04:59 PM   #3
oOPurple_HazeOo
Member
 
Join Date: Apr 2010
Posts: 96
Default

Okay so I've now made this....but it still doesn't work???
Why?????

Code:
<%
Dim gv_theName, gv__POST(), gv_theSurname, gv_theCompany, gv_theNumber, gv_theEmail, gv_theComment

php
gv_theName  = gv__POST("name")
$theSurname  = $_POST["surname"]
$theCompany  = $_POST["company"]
$theNumber  = $_POST["number"]
$theEmail  = $_POST["email"]
$theComment  = $_POST["comment"]
If $theName == true  then
$sender  = $theEmail
$receiver  = "[email protected]"
$client_ip  = $_SERVER["REMOTE_ADDR"]
$email_body  = "Name: " & $theName & " \nSurname: gv_theSurname \nCompany: gv_theCompany 
	\nNumber: gv_theNumber \nEmail: gv_theEmail \nComment: gv_theComment"
If mail( $receiver, "Flash Contact Form", $email_body, $extra )  then
Response.Write "success=yes"
Else
Response.Write "success=no"
End If
End If

%>
oOPurple_HazeOo is offline   Reply With Quote
Old 06-01-2012, 09:06 PM   #4
oOPurple_HazeOo
Member
 
Join Date: Apr 2010
Posts: 96
Default

Anybody?
oOPurple_HazeOo is offline   Reply With Quote
Old 06-02-2012, 12:46 AM   #5
uplight
upla
 
Join Date: Sep 2006
Location: Toronto,Canada
Posts: 127
Default

depend what is "InteractiveObject" doing here
uplight is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:38 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.