Hello,
I'm not sure I'm posting this in the right area.
I have a form that I need to include an option to attach documents if needed.
I have two files: an html file and an asp file
_____________________________________________________________
Now the big question is, how do I make this so that the person can attach a document?
Thanks for your help, Elbee
I'm not sure I'm posting this in the right area.
I have a form that I need to include an option to attach documents if needed.
I have two files: an html file and an asp file
Code:
(html file) <div id="webposting"> <div class="webform5"> <form method="post" action="/forms/web_postinghandler.asp" name="webposting" id="webposting"> <label>Contact Name:</label> <div class="left"><input type="text" class="blue_form_box" name="Name" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span></div> <p style="clear:both"></p> <label>E-Mail Address:</label> <div class="left"><input type="text" class="blue_form_box" name="Email" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div> <p style="clear:both"></p> <label>Location/Department:</label> <div class="left"><input type="text" class="blue_form_box" name="Location" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div> <p style="clear:both"></p> <label>Phone:</label> <div class="left"><input type="text" class="blue_form_box" name="Phone" maxlength="100" size="50" /> <br><span class="red">* (Required)</span></div> <p style="clear:both"></p> <label>Title of Program:</label> <div class="left"><input type="text" class="blue_form_box" name="Title" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div> <p style="clear:both"></p> <label>Date of Program:</label> <div class="left"><input type="text" class="blue_form_box" name="Date" maxlength="100" size="50" /> <br /><span class="red">* (Required)</span><br /></div> <p style="clear:both"></p> <label>Other Requests:<br> (change or addition to policies, procedures, etc.)</label> <div class="left"><textarea class="blue_form_box" name="Changes" rows="5" cols="50"></textarea></div> <p style="clear:both"></p> <div align="center"> <input type="submit" value="Submit" /> <input type="reset" value="Erase Typing" /></div> </form> </div></div>
Code:
(asp file) <div class="webform5"> <% Dim MsgBody, TargetDept, TargetSubject TargetDept = "Technical Support" TargetEmail = "[email protected]" TargetSubject = "Website Posting Form for Program Information" MsgBody = "The following information was submitted by " & Request.Form("Name") MsgBody = MsgBody & vbCRLF & vbCRLF MsgBody = MsgBody & "Attached File: " & Request.Form("filefield") & vbCRLF & vbCRLF MsgBody = MsgBody & "Title of Program: " & Request.Form("Title") & vbCRLF & vbCRLF MsgBody = MsgBody & "Date of Program: " & Request.Form("Date") & vbCRLF MsgBody = MsgBody & "Contact Name: " & Request.Form("Name") & " " & Request.Form("Name") & vbCRLF & vbCRLF MsgBody = MsgBody & "Location/Department: " & Request.Form("Location") & vbCRLF & vbCRLF MsgBody = MsgBody & "Telephone: " & Request.Form("Phone") & vbCRLF & vbCRLF MsgBody = MsgBody & "Email Address: " & Request.Form("Email") & vbCRLF & vbCRLF %> <p><strong>Recap of submission:</strong></p> <p><strong>Subject:</strong></p> <% Response.Write(TargetSubject) %> <p><strong>Department:</strong></p> <% Response.Write(TargetDept) %> <p><strong>Your Information:</strong></p> <% Response.Write(MsgBody) %> <% Set objEmail = CreateObject("CDO.Message") objEmail.From = "[email protected]" objEmail.To = TargetEmail objEmail.Subject = TargetSubject objEmail.Textbody = MsgBody objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "smtp.coj.net" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update objEmail.Send %>
Thanks for your help, Elbee
Comment