Hi, all -

I am not an IT pro like so many of you, but a marketer tasked with maintaining a few company websites and am struggling to get the hang of it again (I used to maintain a company website in a former life). One of the sites I'm in charge of has a request form that is not emailing requests to the intended recipient. I am embarrassed to say it, but I am stumped on how to fix it. Any help is very, very appreciated!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Request Sample Form</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
<style type="text/css">
.style1 {color: #FF0000}

<body bgcolor="#d9d9d9">

<form action="requestsubmitted.asp" method="post" name="requestsubmitted" id="requestsubmitted" onsubmit="MM_validateForm('CompanyName','','R','ContactName','','R','Address','','R','City','','R','Zip','','R','Phone','','R','Email','','RisEmail');return document.MM_returnValue">
  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="body">
  <td width="200" valign="top" class="body"><em class="green style1">* All Fields Are Required</em></td>
  <td valign="top" class="body">&nbsp;</td>
  <td width="200" valign="top" class="body">&nbsp;</td>
  <td valign="top" class="body">&nbsp;</td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Company Name:</td>

      <td valign="top" class="body"><input name="CompanyName" type="text" class="body" id="CompanyName" size="38" maxlength="100"></td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Contact Name (Full Name):</td>
                <td valign="top" class="body"><input name="ContactName" type="text" class="body" id="ContactName" size="38" maxlength="100"></td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Address:</td>

                <td valign="top" class="body"><input name="Address" type="text" class="body" id="Address" size="38" maxlength="100"></td>
                <td width="200" valign="top" class="body"><span class="green">*</span> City, State and Zip:</td>

                <td valign="top" class="body"><input name="City" type="text" class="body" id="City" value="City" size="38" maxlength="100">
                  <select name="State" id="State">
                    <option selected="selected">ST</option>
            <option value="ALABAMA">AL</option>

            <option value="ALASKA">AK</option>
            <option value="AMERICAN SAMOA">AS</option>
            <option value="ARIZONA">AZ</option>
            <option value="ARKANSAS">AR</option>
            <option value="CALIFORNIA">CA</option>
            <option value="COLORADO">CO</option>

            <option value="CONNECTICUT">CT</option>
            <option value="DELAWARE">DE</option>
            <option value="DISTRICT OF COLUMBIA">DC</option>
            <option value="FEDERATED STATES OF MICRONESIA">FM</option>
            <option value="FLORIDA">FL</option>
            <option value="GEORGIA">GA</option>

            <option value="GUAM">GU</option>
            <option value="HAWAII">HI</option>
            <option value="IDAHO">ID</option>
            <option value="ILLINOIS">IL</option>
            <option value="INDIANA">IN</option>
            <option value="IOWA">IA</option>

            <option value="KANSAS">KS</option>
            <option value="KENTUCKY">KY</option>
            <option value="LOUISIANA">LA</option>
            <option value="MAINE">ME</option>
            <option value="MARSHALL ISLANDS">MH</option>
            <option value="MARYLAND">MD</option>

            <option value="MASSACHUSETTS">MA</option>
            <option value="MICHIGAN">MI</option>
            <option value="MINNESOTA">MN</option>
            <option value="MISSISSIPPI">MS</option>
            <option value="MISSOURI">MO</option>
            <option value="MONTANA">MT</option>

            <option value="NEBRASKA">NE</option>
            <option value="NEVADA">NV</option>
            <option value="NEW HAMPSHIRE">NH</option>
            <option value="NEW JERSEY">NJ</option>
            <option value="NEW MEXICO">NM</option>
            <option value="NEW YORK">NY</option>

            <option value="NORTH CAROLINA">NC</option>
            <option value="NORTH DAKOTA">ND</option>
            <option value="NORTHERN MARIANA ISLANDS">MP</option>
            <option value="OHIO">OH</option>
            <option value="OKLAHOMA">OK</option>
            <option value="OREGON">OR</option>

            <option value="PALAU">PW</option>
            <option value="PENNSYLVANIA">PA</option>
            <option value="PUERTO RICO">PR</option>
            <option value="RHODE ISLAND">RI</option>
            <option value="SOUTH CAROLINA">SC</option>
            <option value="SOUTH DAKOTA">SD</option>

            <option value="TENNESSEE">TN</option>
            <option value="TEXAS">TX</option>
            <option value="UTAH">UT</option>
            <option value="VERMONT">VT</option>
            <option value="VIRGIN ISLANDS">VI</option>
            <option value="VIRGINIA">VA</option>

            <option value="WASHINGTON">WA</option>
            <option value="WEST VIRGINIA">WV</option>
            <option value="WISCONSIN">WI</option>
            <option value="WYOMING">WY</option>         
                  <input name="Zip" type="text" id="Zip" value="Zip" size="18" />                  </td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Phone:</td>

                <td valign="top" class="body"><input name="Phone" type="text" class="body" id="Phone" size="38" maxlength="100"></td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Email:</td>

                <td valign="top" class="body"><input name="Email" type="text" class="body" id="Email" size="38" maxlength="100"></td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Product Type:</td>

                <td valign="top" class="body"><select name="ProductType" id="ProductType" style="width:228px">
                  <option selected="selected" >--Choose Type--</option>
                <option value="type2">Type 2 - Urea</option>
                <option value="type3">Type 3 - Melamin</option>
                <option value="type5">Type 5 - Acrylic</option>
                </select>                </td>
                <td width="200" valign="top" class="body"><span class="green">*</span> Product Mesh Type:</td>

                <td valign="top" class="body"><select name="MeshType" id="MeshType" style="width:228px">
                  <option selected="selected">--Choose Size--</option>
                <option value="12/16">12/16</option>
                <option value="16/20">16/20</option>
                <option value="20/30">20/30</option>
                <option value="30/40">30/40</option>
                <option value="40/100">40/100</option>
                <td width="200" valign="top" class="body">&nbsp;</td>
                <td valign="top" class="body">&nbsp;</td>

              <tr align="left">
              <td width="200" valign="top" class="body">&nbsp;</td>
              <td valign="top" class="body"><input name="Send" type="submit" class="body" id="Send" onclick="MM_validateForm('Email','','RisEmail');return document.MM_returnValue" value="Send Request" /></td>



Recommended Answers

All 2 Replies

you forgot to tell about the problem the form has. Probably the form itself is ok, but there might be a problem with the handler of the form, which is "requestsubmitted.asp".

But what is the error?

The emails are sent by the program/script referred to in the action part of the form, in this case that's requestsubmitted.asp That's probably where the problem is, assuming that people complete the form and things go wrong on clicking the send button. Forms are actually totally dead inert objects unless there is some script mentioned as the action, the form itself can send out anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.