Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    50
    Thanks
    31
    Thanked 1 Time in 1 Post

    Form needs to allow multiple attachments

    Hello,

    I have a form with an html file and a corresponding asp file. I can't figure out what it is that I'm missing. Our server will not support PHP.

    This is the html file code:
    Code:
     
    <div id="websiteposting">
    <form action="webpostinghandler.asp" method="post"  enctype="multipart/form-data" name="form1" id="form1">
    <input type="hidden" name="department" value="websiteposting" />
                                                                    
    <h3>Request for Posting to Websites</h3>
                                                                                    
    <p>Please use this form to submit requests for posting on the public and staff websites.  Complete the form below then click &quot;Submit.&quot;<br> You will be contacted by ILS Staff for additional information once your project is scheduled. Projects may take up to four weeks to complete.</p>                   
                        
    <div class="webform">
                        
    <h5 class="h5no">Is your request for posting to:</h5>
    <input type="radio" name="site" value="Public Website" /> Public Website (jaxpubliclibrary.org)
    <input type="radio" name="site" value="Staff Website" />JPL Neighborhood (jplstaff.coj.net)<br />
    
    <h5>Note: This form is for <u>posting</u> already created content to the websites. </h5>
                         
     <h5 class="h5no">Do you have a flier(s) or image you need posted?</h5>
                             <input type="radio" name="scope" value="Yes" /> Yes
                             <input type="radio" name="scope" value="No" /> No<br />
                          <br /> <br />
                          
            <label>Attach File:</label>
                       <div class="left">  <input type="file" name="FileName" id="FileName" /> </div>        
                         <p style="clear:both"></p>                       
                          
            <label>Date of Request:</label>
    <div class="left"><input type="text" class="blue_form_box"name="daterequest" maxlength="50" size="25" />
                                                                                                    </div>
                    <p style="clear:both"></p>  
                        
           <label>Date Needed:</label>
    <div class="left"><input type="text" class="blue_form_box" name="needed" maxlength="50" size="25" />
                                                                                                    </div>
                                                                                                    
                    <p style="clear:both"></p>                                                                         
                                                                                    
    <label>Contact Name:</label>                                                  
    <div class="left"><input type="text" class="blue_form_box" name="SubmittedBy" maxlength="75" size="50" />
                                                                                                    </div>
                                                                                                    
                    <p style="clear:both"></p>
                                                                                                    
    <label>E-mail:</label>
    <div class="left"><input type="text" class="blue_form_box" name="email" maxlength="75" size="50" />
                                                                                                    </div>
                                                                                                    
                <p style="clear:both"></p>
                        
    <label>Phone Number:</label>
    <div class="left"><input type="text" class="blue_form_box" name="phone" maxlength="75" size="50" />
                                                                                                    </div>
                                                                                                    
               <p style="clear:both"></p>
                                                                                                    
    <label>Requests:</label>                       
      <div class="left"><textarea class="blue_form_box" name="other" rows="3" cols="50"></textarea>
                          <br /><span class="smaller">Brief description of work being requested.</span></div>
                                                                                                    
              <p style="clear:both"><br /></p>                    
                        
    <label>Display Dates:</label>
                        
    <div class="left"><input type="text" class="blue_form_box" name="length" maxlength="75" size="50" /><br />
                      <span class="smaller">Dates you would like the information to remain on the website.</span>
                                                                                      </div>
              <p style="clear:both"><br /></p>
                        
     <h5><u>If posting request is a program posted to <span class="darkgreen">evanced</span>, please provide the following:</u></h5>
    <label>Title of Program:</label>
    <div class="left"><input type="text" class="blue_form_box" name="title" maxlength="75" size="50" />
                                                                                                    </div>                                                                                   
             <p style="clear:both"></p>
                                                                                                    
    <label>Date of Program:</label>
    <div class="left"><input type="text" class="blue_form_box" name="date" maxlength="50" size="25" />
                                                                                                    </div>
            <p style="clear:both"></p> 
                                                                                    
    <label>Location/Department:</label>
    <div class="left"><input type="text" class="blue_form_box" name="location" maxlength="75" size="50" />
                                                                                                    </div>
                                                                                                    
             <p style="clear:both"></p>                                                                                                
                    <div align="center">
                    <input type="submit" value="Submit" />
                    <input type="reset" value="Erase Typing" />
                    </div>                                                                                   
                      </div>
                    </form>
                    </div>

    I believe the problem is in the ASP file. Here’s the code for that file:
    Code:
     
    <h3>Thank you!</h3>
    <div class="webform">                 
                                                    
    <%
    Dim MsgBody, TargetEmail, TargetSubject
    
        TargetDept = "Technical Support"
        TargetEmail = "eckersen@coj.net"
        TargetSubject = "Request for website posting"
        MsgBody = "The following question was received from " & Request.Form("SubmittedBy")
        MsgBody = MsgBody & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Is your request for posting to: " & Request.Form("site") & vbCRLF  & vbCRLF
        MsgBody = MsgBody & "~~Do you have a flier(s) or image you need posted?: " & Request.Form("scope") & vbCRLF  & vbCRLF                 
        MsgBody = MsgBody & "~~Date of Request: " & Request.Form("daterequest") & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Date Needed: " & Request.Form("needed") & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Contact Name: " & Request.Form("SubmittedBy") & vbCRLF & vbCRLF         
        MsgBody = MsgBody & "~~E-mail: " & Request.Form("email") & vbCRLF & vbCRLF        
        MsgBody = MsgBody & "~~Phone: " & Request.Form("phone") & vbCRLF & vbCRLF      
        MsgBody = MsgBody & "~~Requests: " & Request.Form("other") & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Display Dates: " & Request.Form("length") & vbCRLF & vbCRLF 
        MsgBody = MsgBody & "~~Title of Program: " & Request.Form("title") & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Date of Program: " & Request.Form("date") & vbCRLF & vbCRLF
        MsgBody = MsgBody & "~~Location: " & Request.Form("location") & 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 Message:</strong></p> <% Response.Write(MsgBody) %>
    
    <%
    
    Set objEmail = CreateObject("CDO.Message")
                    objEmail.From = "website@jpl.coj.net"
                    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  
    %>          
    
    </div>
    
    <p class="clear_both"></p>


    Thank you for any help you can give me. I tried objEmail.AddAttachment and that didn’t help.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,603
    Thanks
    80
    Thanked 4,500 Times in 4,464 Posts
    You haven't responded to my email.

    I need the details of your server environment.

    You *NEED* an upload component. But whether it will be a "pure VBScript" uploader (slow and clumsy, but does work) or an ActiveX component depends on your server.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    Elbee (01-18-2012)

  • #3
    New Coder
    Join Date
    Oct 2010
    Posts
    50
    Thanks
    31
    Thanked 1 Time in 1 Post

    Form Needs to Allow Multiple Attachments

    Hey!

    Is there an pure VBScript" uploader or ActiveX Component that you recommend since I know nothing about them? My Management said they are willing to spend $100. Thanks for all your help, Elbee

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,603
    Thanks
    80
    Thanked 4,500 Times in 4,464 Posts
    I haven't found a good one for under $200. So I think you are stuck using a "pure asp" uploader. For the volume you have, that will probably be okay.

    I've had power outages last two days. Will get back to you after I catch up with work.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •