This content has been marked as final.
Show 11 replies
-
2. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
McKee_Photography May 21, 2007 10:56 AM (in response to kglad)OK, I just feel really stupid......where is the coding suppose to go? This is the errors I'm coming up with: Statement must appear with onclip handler. I'm just confused...my head hurts from this one...now problem doing this in HTML but this flash.....
This is what I've done:
lv=new LoadVars(
lv.Name=Name;
lv.Email=Email;
lv.Phone=Phone;
lv.Service=Service;
lv.sendtoemail="webmaster@mckeephotoandwebdesign.com");
ON the text portion then on the submit button:
onPress=function(lv.sendAndLoad(" http://www.hostmonster.com/monstermail",lv,"POST"))
lv.onData=function(loadMovie(thankyou.swf)
See not being too brilliant here.......
I really appreciate all your help! -
3. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
kglad May 21, 2007 12:22 PM (in response to McKee_Photography)that code should be attached to a frame and you must have defined the string variables Name, Email etc.
and your onData function is incorrect:
-
4. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
McKee_Photography May 21, 2007 12:47 PM (in response to McKee_Photography)OK, I need to define the string variables........
so, the input text field is named "Name"
so to define the variable???
lv.Name="Name"
thanks... -
5. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
kglad May 21, 2007 12:51 PM (in response to McKee_Photography)there wouldn't be much point in doing that. don't you want to create a form that's going to be filled-out by some user(s)?
put some input textfields on-stage and give them instance names (like
nameTF
emailTF
phoneTF
etc. and then use their text property after the user has entered their info:
lv.Name=nameTF.text;
lv.Email=emailTF.text;
lv.Phone=phoneTF.text;
lv.Service=serviceTF.text; -
6. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
McKee_Photography May 21, 2007 1:27 PM (in response to McKee_Photography)I keep getting this error:
symbol=text,layer=layer,frame=1,line=7
description: ')' or ',' expected
source: (submit.onPress=function(lv.sendAndLoad(" http://www.hostmonster.com/monstermail",lv,"POST")) -
7. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
kglad May 21, 2007 1:41 PM (in response to McKee_Photography)well, that's not my coding. check the code in my first message for the correct syntax. -
8. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
McKee_Photography May 21, 2007 2:05 PM (in response to McKee_Photography)OK, sorry....no more errors when I test the movie but when I test it live....nothing happens???? Here's the link again:
http://www.alternativesolutionsforyou.com/contact.htm
Code as it is:
lv=new LoadVars();
lv.Name=name.text;
lv.mailfrom=email.text;
lv.Phone=phone.text;
lv.Service=service.text;
lv.sendtoemail="inquiry@mckeephotoandwebdesign.com"
yourSubmitButton.onPress=function(){
lv.sendAndLoad(" http://www.hostmonster.com/monstermail",lv,"POST");
}
lv.onData=function(){
// data successfully sent
// this will execute if your cgi script returns something after executing
}
I haven't adjusted what happens after you his the submit button yet.....just trying to get the email working. -
9. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
kglad May 21, 2007 2:27 PM (in response to McKee_Photography)did you read the directions for monstermail? you can only send to an email address in the hostmonster domain. -
10. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
McKee_Photography May 21, 2007 3:15 PM (in response to McKee_Photography)The email is fine.......I'm just totally confused........ -
11. Re: New to Flash, create a flash form which is emailed using CGI script when submit button is pressed
kglad May 21, 2007 3:18 PM (in response to McKee_Photography)you can't use that email script (monstermail) and inquiry@mckeephotoandwebdesign.com. check support for forms at hostmonster.com.