Welcome to WebmasterWorld Guest from 18.205.176.85

Forum Moderators: ocean10000

Message Too Old, No Replies

Please Help with this ASP code

I can't get a submit form designed in Dreamweaver to work using ASP.

     
11:06 pm on Nov 10, 2008 (gmt 0)

New User

10+ Year Member

joined:Nov 10, 2008
posts: 1
votes: 0


Hello, I am a new member. I inherited a whole website at my current position that was designed by someone else who used ASP code. The problem I am having is this. We have a form that teachers need to fill out and send to me as webmaster. We have changed our website email address since last year and when I went into the code of the form and changed the email address I am getting errors and cannot get the form to work it gives me the following errors. I need someone who knows this to help me quickly.

Please help anyone! I am getting this error after the submit button is clicked to this form which was designed in Dreamweaver in ASP. The below error appears when the submit button is clicked. You can go to this website address to see the form.

<snip>

Any help soon...thanks

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Prepare/Earthquake_Awareness_Week_07/Earthquake_drill.asp, line 37

wareness Week Response Form</u></h1><h2>Superintendents Name: </h2>" & request.form("Superintendents Name") _

The code for the Dreamweaver page is below: It all started when I tried to change the email address in the current form to the new email address which was changed a few months ago.

I did not design this page and I cannot figure it out...we have a question and answer with the schools on Wednesday...

Can anyone help..thanks....

<%@ Language="VBScript" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>

<TITLE>
Email Test
</TITLE>

<%
If request.form("address") <> "" Then

Dim SCEMDSendMail
Dim SCEMDConfig
Dim SCEMDFields
Dim SCEMDMailMssg

Set SCEMDSendMail = Server.CreateObject("CDO.Message")
Set SCEMDConfig = CreateObject("CDO.Configuration")
Set SCEMDFields = SCEMDConfig.Fields

'This section provides the configuration information for the remote SMTP server.

SCEMDSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
SCEMDSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="emdexch.emd.sc.gov"
SCEMDSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
SCEMDSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
SCEMDSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

SCEMDSendMail.Configuration.Fields.Update

'This section provides the HTML configuration of the form information

wareness Week Response Form</u></h1><h2>Superintendents Name: </h2>" & request.form("Superintendents Name") _
& "<h2>School District: </h2>" & request.form("School District") & "<h2>Name of School: </h2>" _
& request.form("Name of School") & "<h2>Name of Principal: </h2>" & request.form("Name of Principal") _
& "<h2>School Address: </h2>" & request.form("School Address") & "<h2>School Enrollment:</h2>" _
& request.form("School Enrollment") & "<h2>Classroom earthquake drills reached: </h2>" _
& request.form("Number of Students") & " students<br>" & request.form("Number of Faculty") _
& " faculty<br>" & request.form("Number of Staff") & " staff<br>" _
& request.form("Number of Administrators") & " administrators<h2>Did your school conduct an evacuation " _
& "drill following the earthquake drill?</h2>" & request.form("Evacuation Drill") & "<h2>Hazard Reduction Activities: " _
& "</h2><br><strong>a) Wall Mountings secured: </strong>" & request.form("Wall Mountings Secured?") & "<br><strong>b) " _
& "TV Monitor secured: </strong>" & request.form("TV Monitor") & "<br><strong>c) Heavy objects removed from above: " _
& "</strong>" & request.form("Heavy Objects removed?") & "</h3><h2>Comments:</h2> " & request.form("Comments") _
& "<h2>Email address: </h2>" & request.form("address") & "</body></html>"

SCEMDSendMail.To = "webmaster@emd.sc.gov"SCEMDMailMssg = "<html><head><title>Earthquake Drill Form Response</title></head><body><h1><u>Earthquake " _
& "A@emd.sc.gov
SCEMDSendMail.Subject = "Earthquake Drill Response"
SCEMDSendMail.From = "webmaster@emd.sc.gov"
SCEMDSendMail.HTMLBody = SCEMDMailMssg

SCEMDSendMail.Send

Set SCEMDSendMail = Nothing

Call Response.Redirect("Thanks.html")

Else

Call Response.Redirect("NoThanks.html")

End If

%>

</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">

&nbsp;

</BODY>
</HTML>

[edited by: eelixduppy at 9:01 pm (utc) on Nov. 12, 2008]
[edit reason] removed URL [/edit]

11:26 pm on Nov 10, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 8, 2001
posts:766
votes: 0


Just a quick look but the line:

'This section provides the HTML configuration of the form information
wareness Week Response Form</u></h1><h2>Superintendents Name:

Sticks out to me. There should be something before
wareness Week Response Form</u>

Maybe


SCEMDMailMssg = "<h1><u>Earthquake wareness Week Response Form</u>...