This is tough nut to crack. I appreciate you hanging in there with me. You get to the field on the form and hit submit and it does nothing. I included it all this time.
Code:
<%
option explicit
Dim objregx
set objregx = New RegExp
objregx.pattern = "(1-)?\d{3,}-\d{3,}-\d{4,}"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style>
form {
font-family: Arial, Helvetica, sans-serif;
font-size: 20%;
border: #6495ED;
border: outset;
}
</style>
</head>
<body>
<form name="honotice" action="add_ho_claim.asp" method="post">
<TABLE border="0" width="90%">
<tr>
<td colspan="3">
<div align="center"><strong>
Homeowners Loss Notice
</strong></div>
<strong><p>Required fields are in bold fonts. If you do not have the information
to complete this form you may call the Receiver at 1-800-882-3054 or use our <a href="">contact us</a> form</p></strong>
</td>
</tr>
<tr>
<TD>
Company Name:<input type="text" name="txtcompany" size="30" value="Aries Insurance Company">
</TD>
<TD>
<strong>Loss Date:</strong><input type="text" name="txtlossdate" size="8">
</TD>
<td>
Date Reported:<input type="text" name="txtdatereported" value="<%=date%>" size="8">
</td>
</tr>
</table>
<TABLE border="0" width="90%">
<tr>
<td>
<strong>Insured Name: </strong><input type="text" name="txtinsuredname" size="30">
</td>
<td>
<strong>Policy Number:</strong> <input type="text" name="txtpolicynumber" size="15">
</td>
</tr>
<tr>
<td>
Address: <input type="text" name="txtaddress" size="30">
</td>
<td>
<strong>Policy Effective Date:</strong> <input type="text" name="txtpolicyeffectdate" size="8">
</td>
</tr>
<tr>
<td>
City: <input type="text" name="txtcity" size="10">
State: <input type="text" name="txtstate" size="3">
Zip:<input type="text" name="txtzip" size="10">
</td>
<td>
Company/Agent Selling:<input type="text" name="txtcompanyagentseller" size="20">
</td>
</tr>
<tr>
<td>
<strong>Primary Phone:</strong><input type="text" name="txthomephone" size="12">
</td>
<td>
Agent Address:<input type="text" name="txtagentaddress" size="30">
</td>
</tr>
<tr>
<td>
Alternate Phone: <input type="text" name="txtworkphone" size="12">
</td>
<td>
City: <input type="text" name="txtagentcity" size="10">
State: <input type="text" name="txtagentstate" size="3">
Zip:<input type="text" name="txtagentzip" size="10">
</td>
</tr>
<tr>
<td>
Police Report number:<input type="text" name="txtpolicereport" size="11"><br>
Fire Report number: <input type="text" name="txtfirereport" size="11">
</td>
<td colspan="2">
Agent Phone:<input type="text" name="txtagentphone" size="12">
</td>
</tr>
</table>
<TABLE border="0" width="90%">
<tr>
<td>
How did loss occur: <em>multiple selections allowed</em><br>
<select name="txtlossdetails" id="txtlossdetails" multiple>
<option value="Fire or Lightning">Fire or Lightning</option>
<option value="Windstrom or Hail">Windstrom or Hail</option>
<option value="Explosion">Explosion</option>
<option value="Riot of Civil Commotion">Riot of Civil Commotion</option>
<option value="Aircraft">Aircraft</option>
<option value="Vehicle">Vehicle</option>
<option value="Smoke">Smoke</option>
<option value="Vandalism or Malicious Mischief">Vandalism or Malicious Mischief</option>
<option value="Theft">Theft</option>
<option value="Falling Objects">Falling Objects</option>
<option value="Weight of ice, snow or sleet">Weight of ice, snow or sleet</option>
<option value="Accidental discharge or overflow of water or stream">Accidental discharge or overflow of water or stream</option>
<option value="Sudden/accidental tearing apart, craking burning or bulging">Sudden/accidental tearing apart, craking burning or bulging</option>
<option value="Freezing">Freezing</option>
<option value="Sudden/accidental damage from artificial generated electric">Sudden/accidental damage from artificial generated electric</option>
<option value="Other">Other</option>
</select>
</td>
<td>
Describe Loss:<br><textarea cols="35" rows="4" name="txtdescribeloss"></textarea>
</td>
</tr>
</table>
<table border="0" width="90%">
<tr>
<td>
Check box if Injuries are Involved? Yes:
<input type=checkbox name=injuries value=1>
</td>
<td>
If yes: Injured Party:<input type="text" name="injname" size="30">
</td>
</tr>
<tr>
<td>
Your relationship to injured party:<br>
<em>spouse,sibling, etc..</em><input type="text" name="txtinjrelation" size="8">
</td>
<td>
Address:<input type="text" name="txtinjaddress" size="30">
</td>
</tr>
<tr>
<td>
</td>
<td>
City: <input type="text" name="txtinjcity" size="10">
State: <input type="text" name="txtinjstate" size="3">
Zip:<input type="text" name="txtinjzip" size="10">
</td>
</tr>
<tr>
<td>
</td>
<td>
Home Phone:<input type="text" name="txtinjphone" size="12">
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="button" name="btnsubmit" value="Submit Notice">
<input type="reset" value="Clear Form">
</td>
</tr>
</TABLE>
</form>
<script language=vbscript>
Sub btnSubmit_OnClick()
If isdate(honotice.txtlossdate.value) = 0 Then
Alert "You must enter a loss date. If you do not know the loss date please call 1-800-882-3054"
honotice.txtlossdate.focus
Exit Sub
ElseIf Len(honotice.txtinsuredname.value) <2 or IsNumeric(honotice.txtinsuredname.value)then
Alert "You must enter the insured. If you do not know the insured name please call 1-800-882-3054"
honotice.txtinsuredname.focus
Exit Sub
ElseIf Len(honotice.txtpolicynumber.value) = 0 Then
Alert "You must enter the policy number. If you do not know the policy number please call 1-800-882-3054"
honotice.txtpolicynumber.focus
Exit Sub
ElseIf isdate(honotice.txtpolicyeffectdate.value) = 0 Then
Alert "You must enter a policy effective date. If you do not know the policy effective date please call 1-800-882-3054"
honotice.txtpolicyeffectdate.focus
Exit Sub
ElseIf (objRegx.test(honotice.txthomephone.value)) then
Alert "You must enter a phone number. If you do not have a phone please call 1-800-000-0000"
honotice.txthomephone.focus
Exit Sub
End If
Call honotice.submit()
End Sub
</script>
</body>
</html>
Thanks
Rich