Advertisement

07.01.2008 at 02:21PM PDT, ID: 23531733
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Getting an error when trying to submit this form: "Form is undefined"

Asked by bobjoest in Web Development Software, JavaScript, CGI Scripting

Tags: ,

Get form is undefined error when trying to submit this form to the CGI-BIN.  Basically there is a lot of validation going on to make sure they selected a type from the dropdown box and if that type requires a property # then make sure one is entered and it is a 6 digit numeric.  There are two buttons on this form, the open letter one (which i am attaching the call to the first validating function) and the search button.  Not sure why this error is occurring, just need this form to get submitted!  Here is the code:


<HTML>
<HEAD>
<TITLE></TITLE>
<LINK REL=stylesheet HREF="/YonB.css">
</HEAD>
<script type="text/javascript">

function NameSearch(sSearch) {
var sLink = "//domain/cgi-bin/nmarwi40?sSearch=" + sSearch + "&nFilter=3";
if (sSearch.length < 1) {
  alert("Enter a string to search for.");
  return "000000";
}
else {
  for (i = 0; i < sSearch.length; i++) {
    if (sSearch.charAt(i) == " ") {
      alert("Search string must not contain spaces.");
      return "000000";
    }
  }
  return showModalDialog(sLink);
}
}

function doFirst(SelectedValue, PropNum){
if (SelectedValue == 00) {
      alert("Please select a type of letter.");
}
//if the letter type requires a property number
else if (SelectedValue == 04 || SelectedValue == 05 || SelectedValue == 09 || SelectedValue == 11 ||
      SelectedValue == 13 || SelectedValue == 14 || SelectedValue == 15 || SelectedValue == 19 ||
      SelectedValue == 20) {
            if (PropNum.length < 1) {
                  alert("You must enter a property number for that letter type.");
                  }
            else { //Check to make sure the property number is valid
                  ValProperty(PropNum);
                  }
}
else {
return 00;
}
}


//
function ValProperty(value) {
  if (value.length != 6 || isNaN(parseInt(value))) {
    alert("Enter a 6-digit number for property or use the search function to find the property number.");
    return false;
  }
  else {
    form.submit(view) ////////submit the form since everything has been validated
  }
}

//Submit form if input fields are valid
function SubmitView(form) {
if (ValProperty(form.PRPRTY.value)) {
alert("Made it to SubmitForm.");
form.submit()
}
}


function sbmview() {
      PgmName = View.PgmName.value;
    SubmitView(View);
}

function valLetter(sSearch, sFilter){
alert("Var1: " + sSearch + " sFilter: " + sFilter);
}
</script>

<BODY BGCOLOR=rgb(255,255,196) TEXT="BLUE">
<p><br>
</p>
<H1>Mail Merge</H1>
Owner No. <BR>
<FORM ACTION="cgi-bin/sysroi" METHOD="GET" NAME="View">
<INPUT TYPE="hidden" NAME="PgmName" VALUE="NMARWI">
<INPUT TYPE="hidden" NAME="Owner" VALUE="">
<INPUT TYPE="hidden" NAME="User" VALUE=""><small>
<B><table border="0">
      <tbody>
            <tr>
                  <td height="69" width="236"><small><b><br>
                  Select a Template:
                  </b></small><br><select name="nFilter" size="1">
                        <option value="00"></option>
                        <option value="01">60 Day Letter - Escheat</option>
                        <option value="02">60 Day Letter - Executed Division Order</option>
                        <option value="03">60 Day Letter - Title Request</option>
                        <option value="04">60 Day Letter - Unknown Address</option>
                        <option value="05">Change of Address</option>
                        <option value="06">Electronic Funds Transfer Rejection</option>
                        <option value="07">Locate Owners</option>
                        <option value="08">OK - Affidavit of Heirship</option>
                        <option value="09">OK - Death Letter</option>
                        <option value="10">Request - Add Others to Account</option>
                        <option value="11">Request - Both Joint Tenants Sign</option>
                        <option value="12">Request - Death Certificate</option>
                        <option value="13">Request - Recorded Documents</option>
                        <option value="14">Request - Social Security/Tax ID Number</option>
                        <option value="15">Request - Trustee Documents</option>
                        <option value="16">Social Security/Tax ID Number
                        Verification</option>
                        <option value="17">Transfer - Individual to Trust</option>
                        <option value="18">TX - Affidavit of Heirship</option>
                        <option value="19">TX - Death Letter</option>
                        <option value="20">Withhold Payment</option>
                  </select></td>
                  <td height="69" width="41"><small><b></b></small></td>
                  <td height="69" width="110"><small><b><br>
                  Enter Property #:</b></small><br>
                  <small><b><small><small><b></b></small></small></b></small><input type="text" name="PRPRTY" size="5" maxlength="6"">
                  </td>
                  <td height="69" width="33">
                  </td>
                  <td height="69" width="136">or Enter a string to search for Property #:<br>
                  <input type="text" name="sSearch" size="15"></td>
                  <td height="69" width="358"><br>
                  <br>
                  <input type="button" value="Search"
                        onclick="View.Owner.value=NameSearch(sSearch.value);"
                        id="button1" name="button1"></td>
            </tr>
            <tr>
                  <td width="236" height="37"><input type="button" value=" Open Letter " onclick="doFirst(nFilter.value, PRPRTY.value);SubmitView(view)"></td>
                  <td width="41" height="37"></td>
                  <td height="37" width="110"></td>
                  <td height="37" colspan="2"></td>
                  <td height="37" width="358"></td>
            </tr>
      </tbody>
</table></Form>
<P><BR> </p>

</BODY>
</HTML>



















Start Free Trial
 
Loading Advertisement...
 
[+][-]07.01.2008 at 02:40PM PDT, ID: 21911864

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 08:53PM PDT, ID: 21913323

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Web Development Software, JavaScript, CGI Scripting
Tags: JSCript, CGI, IE7
Sign Up Now!
Solution Provided By: busbus
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628