Ask a Question related to Dreamweaver AppDev, Design and Development.
-
amelunks #1
Need help with Email Form
Hello,
I've been working through a tutorial on Form Handling. I'm trying to learn
how to make a simple Contact Us for with Name, email address, subject and
message. I've gone through part of the tutorial and thought I better test it.
I'm working on a pc in DreamweaverMX 2004. I went to test it out in Internet
Explorer and I get a compilation error: ?
'Let' and 'Set' assignment statements are no longer supported.
? and it points to the line?
Set objCDO=Server.CreateObject("CDONTS.NewMail")
I am new to this I don't know where to look to get the new terminology. When
I search the web, all examples are using the 'Set' assignment??
If you could help I'd greatly appreciate it.
Thanks,
Skeeter
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
if Request.Querystring("isSubmitted") = "yes" then
Dim yname, emailVar, tsubject, tMessage
Dim objCDO
yname = Request.QueryString("Name")
emailVar = Request.QueryString("Email_Address")
tsubject = Request.QueryString("Subject")
tMessage = Request.QueryString("Message")
'this is where code is inserted to invoke DCONTS
'This line invoked the object using the name objCDO
Set objCDO=Server.CreateObject("CDONTS.NewMail")
objCDO.From = emailVar
objCDO.To = "email@usa.com"
'to cc someone
'objCDO.CC = "emailaddress@email.com"
'to blind copy someone
'objCDO.Bcc = "emailaddress@email.com"
objCDO.Subject = "Subject: " & tsubject
objCDO.Body = "Name: " & yname & "email?Address: " & emailVar & "Message: " &
tMessage
'BodyFormat=1 for text format, BodyFormat=0 for html format
objCDO.BodyFormat=1
objCDO.MailFormat=1
objCDO.Send
ConfirmMsg = "Thanks for submitting you comments."
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Contact Us</title>
</head>
<body>
<% if ConfirmMsg<>"" then %>
<h2><%=ConfirmMsg %></h2>
<% end if %>
<form action="../formtest.asp" method="get" enctype="text/plain"
name="input_form" id="input_form">
<table width="700" border="0" cellspacing="10" cellpadding="0">
<tr>
<td>Name </td>
<td><input name="yname" type="text" id="yname" size="30"
maxlength="50"></td><br>
</tr>
<tr>
<td>Email Address </td>
<td><input name="Email_Address" type="text" size="30"
maxlength="50"></td>
</tr>
<tr>
<td>subject</td>
<td><input name="tsubject" type="text" id="tsubject" size="50"
maxlength="80"></td>
</tr>
<tr>
<td> </td>
<td><textarea name="tMessage" cols="50" rows="10"
id="tMessage"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input name="isSubmitted" type="hidden" value="yes"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
</body>
</html>
amelunks Guest
-
email form
Hi people Can anyone tell me why my email form will work fine when I preview it seperatly but not when embedded within my site, I mean check out... -
PES Email Form
Does anyone know what's happened to Gregory Peacock? I need to get hold of the PES Email Form - I've stupidly lost my copy of it and I went back to... -
Connenting email form to an email account
:( I am at a mental brickwall. I created a form, created two text fields and a "log in" button. What I want to have happen is when a person goes to... -
Form without Email
I trying to make a form without using the email from the sender, what i need is a script that send the form directly to my email without using the... -
Email a form
I am trying to email information that users enter on my website using a submit button. However, it is not working. Is there a simple way to do... -
Julian Roberts #2
Re: Need help with Email Form
Sounds like you're mixing up ASP and ASP.NET. You've got VB Script in an
ASPX page. Create an ASP page and put your script in there.
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest



Reply With Quote

