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 2 of 2

Thread: Feedback Form

  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Feedback Form

    I have an e-mail feedback form on my website, and when someone clicks the 'send message' button, they're redirected to an error page that says:

    Microsoft VBScript runtime error '800a01c2'

    Wrong number of arguments or invalid property assignment: 'sendemail'

    /contactus.asp, line 22



    Here is the code I currently have, the line in red is line 22. Any help would be great!!!



    <%
    name = request.form("name")
    email = request.form("email")
    telephone = request.form("telephone")
    location = request.form("location")
    findus = request.form("findus")
    subject = request.form("subject")
    comments = request.form("comments")

    ok = false

    if request.servervariables("REQUEST_METHOD") = "POST" then
    if name <> "" and email <> "" and comments <> "" then
    emailtext = "Name: " + name + vbcrlf + _
    "Email: " + email + vbcrlf + _
    "Telephone: " + telephone + vbcrlf + _
    "Location: " + location + vbcrlf + _
    "Find Us: " + findus + vbcrlf + _
    "Subject : " + subject + vbcrlf
    emailtext = emailtext + "Comments"+vbcrlf+"-------"+vbcrlf+comments+vbcrlf
    'call sendemail("jim@zaks.com","jim@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)
    call sendemail("tperegoy@accessliftsandramps.com", "Access Lifts & Ramps Contact Form " + name,emailtext,email)
    call sendemail("brian@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)
    message = "Your message has been sent. Thank you for your input."
    ok = true
    else
    message = "Please fill out all fields"
    end if
    end if
    %>
    <%
    ' For version 1.0
    sub sendemail(byval email, byval subj,byref bodytext,from)

    'response.write "<P>Sending mail to: " & name & " &lt;" & email & "&gt; ..."

    Set Mailer = Server.CreateObject("Persits.MailSender")

    Mailer.From = from
    Mailer.Host = "mailout.zaks.com"

    Mailer.AddAddress email,email
    Mailer.Subject = subj
    Mailer.Body = bodytext

    if Mailer.Send then
    'response.write "DONE"
    else
    'response.write "FAILED<BR>"
    'Response.Write "Error encountered: " & Err.Description
    end if
    end sub
    %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Access Lifts &amp; Ramps / Home Elevators / Stairlifts / Wheelchair Lifts</title>
    <meta name="Description" content="" />
    <meta name="Keywords" content="Stair chair, Syracuse, elderly parents, contact, Stairway ramp, dumbwaiter, accessibility, Stair ramp, Rochester, Buffalo, Chair lift, Chair elevator, Porch lift, elder home care, Wheelchair lift, senior home, Vertical lift, Residential elevator, Platform lift, independent seniors, Home elevator, Stair climbers, Upstate NY, Modular ramp systems, Door Operators" />
    <link href="../style.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> // loads jQuery </script>
    <script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"> // for jQuery UI components </script>
    <script type="text/javascript" src="../js/hoverIntent.js"> // for navigation </script>
    <script type="text/javascript" src="../js/superfish.js"> // for navigation </script>
    <script type="text/javascript" src="../js/supersubs.js"> // for navigation </script>
    <script type="text/javascript"> // This script is for the navigation menu
    $(document).ready(function(){
    $("ul.sf-menu").supersubs({
    minWidth: 12, // minimum width of sub-menus in em units
    maxWidth: 27, // maximum width of sub-menus in em units
    extraWidth: 1 // extra width can ensure lines don't sometimes turn over
    // due to slight rounding differences and font-family
    }).superfish(); // call supersubs first, then superfish, so that subs are
    // not display:none when measuring. Call before initialising
    // containing tabs for same reason.
    });
    </script>
    <script type="text/javascript"> // This script is for the accordion
    $(function() {
    $("#accordion").accordion({
    autoHeight: false,
    collapsible: true,
    icons: {'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' }
    });
    });
    </script>
    <script type="text/javascript"> // This script is for the tabbed panels
    $(function() {
    $("#tabs").tabs();
    });
    </script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
    body {
    background-color: #fff;
    }
    </style>
    </head>
    <body>
    <div id="header" class="container_12"> <img src="../images/header2Anniversary2.gif" alt="Logo"/></div>
    <div id="nav" class="container_12 toprounded">
    <ul class="sf-menu">
    <li class="first-item"> <li> <a href="index.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> </li>
    <!-- apply first-item class to round the menu item corner -->
    <li> <a href="aboutus.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;About Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>

    <li> <a href="ourservice.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Our Service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> </li>

    <li> <a href="#">&nbsp;&nbsp;&nbsp;&nbsp;Media Gallery&nbsp;&nbsp;</a> <ul>
    <li><a href="photos.html">Photos</a></li>
    <li><a href="videos.html">Videos</a></li>
    </ul>
    </li>

    <li> <a href="#">Resource Center</a>
    <ul>

    <li> <a href="articles.html">Articles</a></li>

    <li> <a href="links.html">Links</a></li>

    <li> <a href="newsletters.html">Newsletters</a></li>

    </ul>

    <li> <a href="testimonials.html">&nbsp;&nbsp;&nbsp;Testimonials&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
    <li> <a href="contactus.asp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
    <li> <a href="#"><font color="#FFCC00"><strong>(585) 247-1210</strong></font></a></li>
    </ul>
    </li>
    </div>
    <div ></div>
    <div id="content" class="container_12">
    <div class="grid_9 push_3">

    <h1>Contact Access Experts</h1>


    <div class="form">

    <% if message <> "" then %>
    <p align="center"><font size="+1"><%=message%></font></p>
    <% end if %>
    <% if not ok then %>
    <form action="contactus.asp" method="post">
    <form id="contactform">
    <ol>
    <li>
    <input name="name" type="text" id="name" value="Your Name"> </li>
    <li>
    <input name="email" type="text" id="email" value="Email">
    </li>
    <li>
    <input name="telephone" type="text" id="telephone" value="Telephone Number">
    </li>

    <li>
    <input name="location" type="text" id="location" value="City State">
    </li>
    <li>
    <input name="findus" type="text" id="findus" value="How did you find us ?">
    </li>

    <li>
    <input name="subject" type="text" id="subject" value="Subject">
    </li>
    <li>
    <textarea name="comments" id="comments" rows="6" cols="50"></textarea>
    </li>
    <li class="buttons">
    <input name="imageField" type="image" class="buttons" id="imageField" value="Send Message" src="../images/send.gif" />
    <div class="clr"></div>
    </li>
    </ol>
    </form>

  • #2
    Regular Coder
    Join Date
    Aug 2011
    Location
    U.S.A.
    Posts
    233
    Thanks
    2
    Thanked 48 Times in 48 Posts
    This is just a guess, since I don't work in asp, but the line above it was executed just fine. So since the error says that you don't have enough arguments, look at the commented line above, which is the same call:

    Code:
    'call sendemail("jim@zaks.com","jim@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)
    It looks like in your call, you are missing the first or second argument (either fromname or from email). I would try duplicating the email address, and show it like so:

    Code:
    call sendemail("tperegoy@accessliftsandramps.com","tperegoy@accessliftsandramps.com", "Access Lifts & Ramps Contact Form " + name,emailtext,email)
    and see if that works.


  •  

    Posting Permissions

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