thriftynomad
11-06-2003, 06:50 PM
Hello all... I come grovelling in search of what is probably a fairly elementary answer...
I have been trying for days to pass info from Flash 2004 to an ASPmail script.
When I submit the following code, a new window opens with the variable name and pairs show in the URL... which I thought was only supposed to happen with a "GET" command, not "POST".
e.g. -- http://www.maxxquest.com/thur/mailer6.asp?fromaddress=abc%40123%2Ecom&fromname=John
(mouse over this to see the whole url in the status bar)
Either way, the script returns an error saying that necessary fields are blank.
All of my fields are on a single layer with no movie clips or other embedding... the two fields I'm trying to send are 'fromname' and fromaddress'
here's the actionscript for the submit button:
on (release) {
var mailtest = new LoadVars();
mailtest.fromname = fromname.text;
mailtest.fromaddress = fromaddress.text;
mailtest.send("mailer6.asp", "_blank", "POST");
}
here's the ASP script:
<html>
<head>
<title>11/05/03 - 12:23PM</title>
</head>
<body bgcolor="white">
<h3><font face="arial">Thank You</font></h3>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = Request.Form("fromname")
Mailer.FromAddress= Request.Form("fromaddress")
Mailer.RemoteHost = "www.server.com"
Mailer.AddRecipient "John Doe", "[email protected]"
Mailer.Subject = "Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
Response.Write "Form information submitted..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
%>
</body>
</html>
I don't need any response to be sent back to the flash movie, just the confirmation from the script in the new HTML window...
Please, please, please... can anyone shed some light on this... I've researched every tutorial and movie I can find... all with no luck.
Thanks again in advance,
Greg.
I have been trying for days to pass info from Flash 2004 to an ASPmail script.
When I submit the following code, a new window opens with the variable name and pairs show in the URL... which I thought was only supposed to happen with a "GET" command, not "POST".
e.g. -- http://www.maxxquest.com/thur/mailer6.asp?fromaddress=abc%40123%2Ecom&fromname=John
(mouse over this to see the whole url in the status bar)
Either way, the script returns an error saying that necessary fields are blank.
All of my fields are on a single layer with no movie clips or other embedding... the two fields I'm trying to send are 'fromname' and fromaddress'
here's the actionscript for the submit button:
on (release) {
var mailtest = new LoadVars();
mailtest.fromname = fromname.text;
mailtest.fromaddress = fromaddress.text;
mailtest.send("mailer6.asp", "_blank", "POST");
}
here's the ASP script:
<html>
<head>
<title>11/05/03 - 12:23PM</title>
</head>
<body bgcolor="white">
<h3><font face="arial">Thank You</font></h3>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = Request.Form("fromname")
Mailer.FromAddress= Request.Form("fromaddress")
Mailer.RemoteHost = "www.server.com"
Mailer.AddRecipient "John Doe", "[email protected]"
Mailer.Subject = "Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
Response.Write "Form information submitted..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
%>
</body>
</html>
I don't need any response to be sent back to the flash movie, just the confirmation from the script in the new HTML window...
Please, please, please... can anyone shed some light on this... I've researched every tutorial and movie I can find... all with no luck.
Thanks again in advance,
Greg.