object expected

admin

Administrator
Staff member
Does anybody know why I'm getting an object expected error at the start of my HTML form? For simplicity, I shortened my javascript to only check the first field (still getting the error).

Many thanks for any help!!

Javascript:

<script language="javascript">
<!-- // begin
function validator(theform)
{
var error = "";
var digits = ".0123456789";

if (theform.name.value == "")
{
error += "Please fill in product name.\n";
}

if (error != "")
{
alert(error);
return (false);
}
}
// -->
</script>

Form:

<form action="" method="POST" name="theform" onsubmit="return Validator(this)">
<p><font size="2">
<input type="text" name="name" size="20" maxsize="30"><font size="2">&nbsp; Product Name<br></font>
<input type="text" name="price1" size="5" value=http://www.webdeveloper.com/forum/archive/index.php/"0.00" maxsize="5"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price 1<br></font>
<input type="text" name="land1" size="20" maxsize="80"><font size="2">&nbsp; Description Land Line 1<br></font>
<input type="text" name="cell1" size="20" maxsize="80"><font size="2"><font size="2">&nbsp; Description Cell Phone 1<br></font>
<input type="text" name="incr1" size="10" maxsize="10"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Increments 1<br></font><font>
<input type="text" name="maint_d1" size="20" maxsize="25"><font size="2">&nbsp; Maintenance Fee 1 Description<br></font>
<input type="text" name="maint_f1" size="3" value="0.00" maxsize="3"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Maintenance Fee 1</font></p>
<p><font size="2">
<input type="text" name="price2" size="5" value="0.00" maxsize="5"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price 2<br></font>
<input type="text" name="land2" size="20" maxsize="80"><font size="2">&nbsp; Description Land Line 2<br></font>
<input type="text" name="cell2" size="20" maxsize="80"><font size="2"><font size="2">&nbsp; Description Cell Phone 2<br></font>
<input type="text" name="incr2" size="10" maxsize="10"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Increments 2<br></font>
<input type="text" name="maint_d2" size="20" maxsize="25"><font size="2">&nbsp; Maintenance Fee 2 Description<br></font>
<input type="text" name="maint_f2" size="3" value="0.00" maxsize="3"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Maintenance Fee 2</font></p>
<p>
<input type="text" name="conn" size="20" maxsize="25"><font size="2">&nbsp; Connect Fee<br></font>
<input type="text" name="cust1" size="15" maxsize="15"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customer Service number 1<br></font>
<input type="text" name="cust2" size="15" maxsize="15"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customer Service number 2<br></font>
<input type="text" name="tf1" size="15" maxsixe="15"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Toll Free number 1<br></font>
<input type="text" name="tf2" size="15" maxsize="15"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Toll Free number 2</font></font></p>
<p><font size="1"><textarea rows="4" name="special" cols="25" maxsize="25"></textarea></font><font size="2">&nbsp;
Special Instructions</font></p>
<p><font size="1"><input type="file" name="photo" size="25"></font><font size="2">&nbsp; Photo of Product</font></p>
<p><font size="1"><input type="submit" value="Add" name="add_rec"></font></p>
</form>
 
Back
Top