aumandg
asked on
error on page
when I try to submit a form that is first supposed to very field input values, I get "error on page". I have looked and looked and looked, but I can not find the problem. The code is found below. Can you see the problem? What am I doing wrong?
Thank You!
<html>
<head>
<link rel="stylesheet" type="text/css" href="format.css">
<title>Registration Form</title>
<script language="javascript">
function validate () {
var str1 = "";
var found;
with (document.fRegistration) {
if (inst.value == "") {
found = true;
}
if (address.value == "") {
found = true;
}
if (city.value == "") {
found = true;
}
if (state.value == "") {
found = true;
}
if (zip.value == "" ) {
found = true;
}
if (mail.value == "") {
found = true;
}
if (contact.value == "") {
found = true;
}
if (website.value == "") {
found = true;
}
if (title.value == "") {
found = true;
}
if (phone.value == "") {
found = true;
}
if (!reserve[0].checked && !reserve[1].checked) {
found = true;
}
str1 = "Please fill in all required fields.";
if (!found) { submit(); } else { alert(str1) }
}
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="640"
align=center>
<tr>
<td width="20" bgcolor="#000080"> </ td>
<td width="620" valign=top><img border="0" src="newheader2.jpg"
width="576" height="85"></td>
</tr>
<tr><td width="20" bgcolor="#000080"> </ td>
<td> </td></tr>
<tr><Td width="20" bgcolor="#000080"> </ td>
<td class=regtext valign=top>
<table width="90%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td class=regtext><p><br>
<center><h2>Fair Registration</h2><u>Regist ration Form</u><p>Application Deadline: Thursday, September 29, 2006<p>
</center>
<!------------------------ ---------- --->
<table width="90%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td><p>
<form name="fRegistration" method="post" action="thanks.asp">
<input type="radio" name="reserve" value="Yes"> Reserve a table (up to two representatives) for the Fair on Wednesday,
October 5, 2005. The $10 registration fee or purchase order will be sent upon confirmation of my registration.<p>
<input type="radio" name="reserve" value="No"> We will be unable to attend, but please keep us on your mailing list for future events.<p>
</font>
<CENTER><font color="#ff0000">*</font> = Required</CENTER>
<table border="0">
<tr><td><font color="#ff0000">* </font>Institution:</td><t d><input type="text" name="inst" size="60"><BR>
<sub>(as you wish it to appear on the program and table sign)</sub></td></tr>
<tr><td><font color="#ff0000">* </font>Address:</td><td><i nput type="text" name="address" size=60><BR></td></tr>
<tr><td><font color="#ff0000">* </font>City:</td><td><inpu t type="text" name="City" size=31><font color="#ff0000"> * </font> State: <input type="text" name="State" size=2><font color="#ff0000"> * </font>Zip: <input type="text" name="Zip" size=2></td></tr>
<tr><td><font color="#ff0000">* </font>Website:</td><td><i nput type="text" name="website" size=60><BR></td></tr>
<tr><td><font color="#ff0000">* </font>Contact Person:</td><td><input type="text" name="contact" size=60><BR></td></tr>
<tr><td><font color="#ff0000">* </font>Title:</td><td><inp ut type="text" name="title" size=60><BR></td></tr>
<tr><td><font color="#ff0000">* </font>Telephone:</td><td> <input type="text" name="phone" size=27><font color="#ff0000"> </font> Fax: <input type="text" name="fax" size=23></td></tr>
<tr><td><font color="#ff0000">* </font>Email:</td><td><inp ut type="text" name="mail" size=60><BR></td></tr>
<tr><td></td><td><font color="#ff0000">* </font><input type="checkbox" name="electric"> Yes, we will require access to an electrical outlet</td></tr>
<tr><td> <p></td></tr >
<tr><td colspan="2">Representative (s) Attending:</td></tr>
<tr><td colspan="2">1. <input type="text" name="rep1name" size=40> Title: <input type="text" name="rep1title" size=20></td></tr>
<tr><td colspan="2">2. <input type="text" name="rep2name" size=40> Title: <input type="text" name="rep2title" size=20><p><p></td></tr>
<tr><td colspan="2"><center>
<input type=button name="submitform" value="Submit Your Registration" onclick="javascript:valida te()"></td ></tr>
<tr><td colspan="2"><center><p><p>
</td></tr>
</table>
<!------------------------ ---------- --->
</td></tr>
</td></tr>
<tr><td colspan=2 class=bottommenu align=center><BR><BR>
<B><I>Our Association</b></i><BR><BR >
<a href="http://www.homepage.org">Home Page</a><BR>
</td></tr>
</table>
</body>
</html>
Thank You!
<html>
<head>
<link rel="stylesheet" type="text/css" href="format.css">
<title>Registration Form</title>
<script language="javascript">
function validate () {
var str1 = "";
var found;
with (document.fRegistration) {
if (inst.value == "") {
found = true;
}
if (address.value == "") {
found = true;
}
if (city.value == "") {
found = true;
}
if (state.value == "") {
found = true;
}
if (zip.value == "" ) {
found = true;
}
if (mail.value == "") {
found = true;
}
if (contact.value == "") {
found = true;
}
if (website.value == "") {
found = true;
}
if (title.value == "") {
found = true;
}
if (phone.value == "") {
found = true;
}
if (!reserve[0].checked && !reserve[1].checked) {
found = true;
}
str1 = "Please fill in all required fields.";
if (!found) { submit(); } else { alert(str1) }
}
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="640"
align=center>
<tr>
<td width="20" bgcolor="#000080"> </
<td width="620" valign=top><img border="0" src="newheader2.jpg"
width="576" height="85"></td>
</tr>
<tr><td width="20" bgcolor="#000080"> </
<td> </td></tr>
<tr><Td width="20" bgcolor="#000080"> </
<td class=regtext valign=top>
<table width="90%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td class=regtext><p><br>
<center><h2>Fair Registration</h2><u>Regist
</center>
<!------------------------
<table width="90%" border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td><p>
<form name="fRegistration" method="post" action="thanks.asp">
<input type="radio" name="reserve" value="Yes"> Reserve a table (up to two representatives) for the Fair on Wednesday,
October 5, 2005. The $10 registration fee or purchase order will be sent upon confirmation of my registration.<p>
<input type="radio" name="reserve" value="No"> We will be unable to attend, but please keep us on your mailing list for future events.<p>
</font>
<CENTER><font color="#ff0000">*</font> = Required</CENTER>
<table border="0">
<tr><td><font color="#ff0000">* </font>Institution:</td><t
<sub>(as you wish it to appear on the program and table sign)</sub></td></tr>
<tr><td><font color="#ff0000">* </font>Address:</td><td><i
<tr><td><font color="#ff0000">* </font>City:</td><td><inpu
<tr><td><font color="#ff0000">* </font>Website:</td><td><i
<tr><td><font color="#ff0000">* </font>Contact Person:</td><td><input type="text" name="contact" size=60><BR></td></tr>
<tr><td><font color="#ff0000">* </font>Title:</td><td><inp
<tr><td><font color="#ff0000">* </font>Telephone:</td><td>
<tr><td><font color="#ff0000">* </font>Email:</td><td><inp
<tr><td></td><td><font color="#ff0000">* </font><input type="checkbox" name="electric"> Yes, we will require access to an electrical outlet</td></tr>
<tr><td> <p></td></tr
<tr><td colspan="2">Representative
<tr><td colspan="2">1. <input type="text" name="rep1name" size=40> Title: <input type="text" name="rep1title" size=20></td></tr>
<tr><td colspan="2">2. <input type="text" name="rep2name" size=40> Title: <input type="text" name="rep2title" size=20><p><p></td></tr>
<tr><td colspan="2"><center>
<input type=button name="submitform" value="Submit Your Registration" onclick="javascript:valida
<tr><td colspan="2"><center><p><p>
</td></tr>
</table>
<!------------------------
</td></tr>
</td></tr>
<tr><td colspan=2 class=bottommenu align=center><BR><BR>
<B><I>Our Association</b></i><BR><BR
<a href="http://www.homepage.org">Home Page</a><BR>
</td></tr>
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Same goes for "State" and "Zip"
ASKER
thank you very much!!!
no problemo. thanks for the A !