PDA

View Full Version : Flashform+ASP


Marcel
09-30-2002, 08:38 PM
Hello people. I must Build a flash form (I use FLMX) with ASP. I've build the form (only 5 fields) and an ASP page, but it won't work. Help!!!!!!!

Marcel
09-30-2002, 09:16 PM
Maybe should I post the fla and the asp page to simplify the whole?

tg
09-30-2002, 09:34 PM
yep, that would simplify things.

tg
10-01-2002, 04:22 PM
looks like you've got some problems with your asp page.
check here (http://www.aspfaq.com/show.asp?id=2026) for info/examples on cdonts.
do a search on that site for 'cdonts' for more info.

Marcel
10-01-2002, 05:52 PM
Desperation.... :( The problem is that once I click the button, it does happen nothing; no errors, no blocks, no success' message in flash, nothing of nothing. Maybe the call from the fla button is wrong or what else? The original asp code before I modified it, was the following one (it neither worked too, thus I've modified it with the asp source I've sent; basically I've substituted SMTPsvg.Mailer with CDONTS.ObjMail, then substituted Mailer with ObjMail accordingly):

<%
Nome = Request.form("Nome")
Email = Request.form("Email")
Intestazione = Request.form("Intestazione")
Tempistica = Request.form("Tempistica")
Testo = Request.form("Testo")
Privacy = Request.form("Privacy")

strName = "Direzione"
strEmail = "direzione@consulenzaebilanci.it"

strSubject = ("Intestazione")
strBody = Testo & Tempistica & Email

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "mail.aruba.it"
Mailer.FromName = Nome
Mailer.FromAddress = Email
Mailer.AddRecipient strName, strEmail
Mailer.Subject = (strSubject)
Mailer.BodyText = strTesto

if Mailer.form1 then
Response.Write "_root.Mail.EmailStatus=Grazie per averci contattato"
else
Response.Write "_root.Mail.EmailStatus=Veificare errore nell'email"
Response.Write Mailer.Response
end if
%>
____________________

P. s.; but it is "Mailer.RemoteHost = "mail.aruba.it" mandatory?

Time ago I've used the following script with a normal form, and it worked!

<%
Dim t1name,t1,t2name,t2,t3name,t3
t1name = "Nome:"
t1 = Request.Form("t1")
t2name = "Email:"
t2 = Request.Form("t2")
t3name = "Soggetto:"
t3 = Request.Form("t3")
t4name = "Società:"
t4 = Request.Form("t4")
t5name = "Indirizzo:"
t5 = Request.Form("t5")
t6name = "Località:"
t6 = Request.Form("t6")
t7name = "Telefono:"
t7 = Request.Form("t7")
t8name = "Tempistica:"
t8 = Request.Form("t8")
p1name = "Privacy:"
p1 = Request.Form("p1")
Dim stname,st
stname = "_________________________________________________"
st = Request.Form("s1")
Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
'CHANGE THE EMAIL ADDRESS IN QUOTES BELOW TO THE ADDRESS YOU WANT THIS MAIL SENT
ObjMail.To = "direzione@consulenzaebilanci.it"
ObjMail.From = t2
ObjMail.Subject = t3
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
t5name & vbcrlf&_
t5 & vbcrlf&_
t6name & vbcrlf&_
t6 & vbcrlf&_
t7name & vbcrlf&_
t7 & vbcrlf&_
t8name & vbcrlf&_
t8 & vbcrlf&_
p1name & vbcrlf&_
p1 & vbcrlf&_
stname & vbcrlf&_
st
ObjMail.Send
Set ObjMail = Nothing
%>

Now the whole doesn't work with flash in any ways. Desperation.... :(

tg
10-01-2002, 06:08 PM
for debuggin purposes change:

loadVariablesNum("form1.asp", "0", "POST");
//to:
getURL("form1.asp","","GET");

this will do a couple of things for your.
1. it will pass all your variables through the address bar of your browser, so you can see what (if anything is being passed)
2. it will open the asp form in a new window, if the server has any problems with the asp syntax, you will see the error messages. - flash hides them.



the error i got from your asp page was:

Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'ObjMail.FromName'
/test2/form.asp, line 17

far as i know, cdonts has a 'from' property, but not a fromName property... of course it has been almost 2 years since i have used this object, so undoubtedly things probably have changed. look around at some asp sites if you find alot of asp problems.

Marcel
10-01-2002, 07:06 PM
I've solved it. Thanks!