|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Got an easy one for you
<i><b>Originally posted by : Iain Trotter (iaint@filmi.co.uk)</b></i><br />Quick and easy question.<br /><br />I have a form mail thing on my web page and am using cdonts with the script<br /><br />"<% @language="VBSCRIPT" %> <br /><br /><%<br /> Set objMail = Server.CreateObject("CDONTS.Newmail")<br /> objMail.To = request.form ("recipient")<br /> objMail.Subject = request.form ("name")<br /> objMail.From = request.form ("email")<br /> objMail.Body = request.form ("message")<br /> objMail.Send<br /> Set objMail = Nothing<br /><br /><br />Response.Redirect "thankyou.html" <br /><br />%> "<br /><br />It actually works fine but only if the peson enters their name their e-mail and their message (the recipient is fixed) I want it to be so that they can just enter one or two of the three things and it still works.<br /><br />Can anybody help?<br /><br />Thanks<br /><br />IainT<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Danny Carvajal (dcarva@texas.net)</b></i><br />One thing that I do, is force them to enter all necessary information. I do this via Javascript. If they submit the form without entering the proper info, I popup a message telling them to enter their name, etc.<br /><br />If you want to send it anyways, you can do this.<br /><br />Dim strName<br />strName = Trim(request.form("name"))<br />if strName = "" then<br /> objMail.Subject = "not_specified"<br />else<br /> objMail.Subject = strName<br />end if<br /><br />Hope that helps,<br />Danny<br /><br />------------<br />Iain Trotter at 2/17/2001 10:02:36 AM<br /><br />Quick and easy question.<br /><br />I have a form mail thing on my web page and am using cdonts with the script<br /><br />"<% @language="VBSCRIPT" %> <br /><br /><%<br /> Set objMail = Server.CreateObject("CDONTS.Newmail")<br /> objMail.To = request.form ("recipient")<br /> objMail.Subject = request.form ("name")<br /> objMail.From = request.form ("email")<br /> objMail.Body = request.form ("message")<br /> objMail.Send<br /> Set objMail = Nothing<br /><br /><br />Response.Redirect "thankyou.html" <br /><br />%> "<br /><br />It actually works fine but only if the peson enters their name their e-mail and their message (the recipient is fixed) I want it to be so that they can just enter one or two of the three things and it still works.<br /><br />Can anybody help?<br /><br />Thanks<br /><br />IainT<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Got an easy one for you |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|