Hvad går galt her?
Hej eksperter,Hvad går galt i dette script? Jeg får en grim fejl,
CONST sFrom = "konkurrence@konkurrence.dk"
CONST sTo = "konkurrencer@konkurrence.dk"
CONST sSubject = "Konkurrence nr. 3"
'Response.Write( Request.Form)'
If UCase(Request.Form("Sub")) = "YES" Then If Request.Form("question1") = "answer1b" Then If Request.Form("question2") = "answer2a" Then If Request.Form("question3") = "answer3b" Then
s1 = Request.Form("name")
s2 = Request.Form("streetadress")
s3 = Request.Form("postalcode")
s4 = Request.Form("city")
s5 = Request.Form("email")
s6 = Request.Form("number")
s7 = Request.Form("terms")
sBody = "Name: " & s1 & vbcrlf
sBody = sBody & "StreetAdress: " & s2 & vbcrlf
sBody = sBody & "Postalcode: " & s3 & vbcrlf
sBody = sBody & "City: " & s4 & vbcrlf
sBody = sBody & "Phone: " & s6 & vbcrlf
sBody = sBody & "Email: " & s5 & vbcrlf
sBody = sBody & "Accept info: " & s7 & vbcrlf
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sFrom, sTo, sSubject, sBody, 1
Set objNewMail = Nothing
Response.Write("<SCRIPT>alert('Tak for svaret')</SCRIPT>")
Else
Response.Write("<SCRIPT>alert('Tak for svaret')</SCRIPT>")
End If
End If
End If
End If
%>
Jeg bliver ved med at få flg. fejl:
Microsoft VBScript compilation error '800a0412'
Must be first statement on the line
/konkurrence/konkurrence3/Default.asp, line 211
If UCase(Request.Form("Sub")) = "YES" Then If Request.Form("question1") = "answer2b" Then If Request.Form("question2") = "answer3a" Then If Request.Form("question3") = "answer1b" Then
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
Html-formen hedder question og de 9 svarmuligheder er navngivet 1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b og 3c.
Kan nogen hjælpe?
/magger
