-
Dec 18, 2002, 11:19 AM
#1
Dreamweaver submit form script
I am working on a website (in dreamweaver) which has a form which request comments from a visitor, and for them to hit the submit button top send the comments to an email address.
So far it seems like I need a script to complete this task, (correct me if I am wrong) whether java script or cgi or whatever!!
Does anyone have such a script to share?
-
Dec 18, 2002, 02:41 PM
#2
Re:Dreamweaver submit form script
Yes you do need a script to do the sending, which is dependent on your server/host - you need to know what your host supports... CDONTS, SENDMAIL, ASPMAIL, W3 JMail, etc. - i'm sure someone will be kind enough to list the ones i have missed ;D
[glow=red,2,300]FYI[/glow]
Windows Win2k and XP Pro users - CDOSYS comes installed on Win2k and XP Pro.
Windows NT4 and Win2k users - IIS 4 and 5 on NT4 and Win2k instals the CDONTS e-mail component by default, but you need the SMTP server that comes with IIS installed on the web server as well (This is the e-mail component that most web hosts will use).
-
Dec 19, 2002, 11:48 AM
#3
Re:Dreamweaver submit form script
Host has ASP support running IIS 5.0 on Windows 2000 and has ASPMail component and DevMailer Component support.
-
Dec 19, 2002, 09:50 PM
#4
Re:Dreamweaver submit form script
Copy and Paste this code into a new .asp file and then submit your form to it. : >>> Uses CDONTS
2 Variable are required from the form - Email (email address of sender from form) & the Comments (Comments Field).
2 other variable exists - your email (destination) and the subject - which i have set to "comments" - Good Luck...
__________________________________________________ _____
<%
Dim strEmailAddress
Dim strContactEmail
Dim strComments
Dim StrSubject
strEmailAddress = ("rcollin@hotmail.com"
strSubject = ("Comments"
strContactemail = Request.Form("email"
strComments = Request.Form("Comments"
Dim objCDOMail 'Holds the CDONTS mail object
'Create the e-mail server object (this has to be set with each email for CDONTS)
Set objCDOMail = Server.CreateObject("CDONTS.NewMail"
With objCDOMail
'Who the e-mail is from
.From = strContactemail
'Who the e-mail is sent to
.To = strEmailAddress
'The subject of the e-mail
.Subject = strSubject
'The main body of the e-amil
.Body = "<html><body> " & Comments & "</body><html>"
'Set the e-mail body format (0=HTML 1=Text)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.BodyFormat = 0
Else
.BodyFormat = 1
End If
'Set the mail format (0=MIME 1=Text)
.MailFormat = 0
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
.Importance = 1
'Send the e-mail
.Send
End With
'Release the object (this has to be done with each email for CDONTS)
Set objCDOMail = Nothing
Response.Redirect"thanks.htm" ;
%>
__________________________________________________ ____
1 more thing - Response.Redirect"thanks.htm" sends you to a page after the processing is completed - you can change the destination page or let the display a message without redirect - its up 2 you...
BTW: I am terrible at documenting code :-\ so take your time going through it - if it doesn't work catch me online and i'll try to help further... :-x
-
Dec 20, 2002, 09:30 AM
#5
Re:Dreamweaver submit form script
I knew Verm would come through once it was ASP related ;D
-
Dec 20, 2002, 09:40 AM
#6
Re:Dreamweaver submit form script
[quote author=Vermanucci link=board=5;threadid=343;start=0#2463 date=1040352646]
BTW: I am terrible at documenting code :-\ so take your time going through it - if it doesn't work catch me online and i'll try to help further... :-x
[/quote]
Hey Vermanucci,
Thanks for that, I shall be lookign at it and will let you know how it goes.
Again Thanks.
-
Dec 20, 2002, 11:53 PM
#7
Re:Dreamweaver submit form script
[quote author=Chris link=board=5;threadid=343;start=0#2466 date=1040394647]
I knew Verm would come through once it was ASP related ;D
[/quote]
: : :P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules