
February 23rd, 2001, 12:20 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 23
|
|
|
<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 />------------<br />Iain Trotter at 2/17/2001 10:02:33 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 />
|