if this helps at all, here is the whole code!
Code:
<script type="text/javascript">
function validate_required(field,alerttxt,select)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(first_name,"First name must be filled out!")==false)
{first_name.focus();
first_name.style.border='2px solid red';
return false;}
}
with (thisform)
{
if (validate_required(last_name,"Last name must be filled out!")==false)
{last_name.focus();
last_name.style.border='2px solid red';
return false;}
}
with (thisform)
{
if (validate_required(address1,"Address must be filled out!")==false)
{address1.focus();
address1.style.border='2px solid red';
return false;}
}
with (thisform)
{
if (validate_required(phone,"Phone Number must be filled out!")==false)
{phone.focus();
phone.style.border='2px solid red';
return false;}
}
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();
email.style.border='2px solid red';
return false;}
}
with (thisform)
{
if (validate_required(m21,"Email must be filled out!")==false)
{m21.focus();
return false;}
}
} //last
</script>
Code:
<form name="super_reg" method="post" onsubmit="return validate_form(this)" action="thankyou.php" >
<tr>
<td colspan="2"><img name="flat_r4_c1" src="images/flat_r4_c1.jpg" width="209" height="105" border="0" id="flat_r4_c1" alt="" /></td>
<td colspan="2"><img name="flat_r4_c3" src="images/flat_r4_c3.jpg" width="224" height="105" border="0" id="flat_r4_c3" alt="" /></td>
<td rowspan="3" colspan="5">
<!-- Start of register div -->
<div class="register">
<div class="wrap_register">
<p>First Name</p>
<input name="first_name" type="text" class="long" />
<p>Last Name</p>
<input name="last_name" type="text" class="long" />
<p>Address</p>
<input name="address1" type="text" class="long" />
<input name="address2" type="text" class="long single" />
<p>Phone Number</p>
<input name="phone" type="text" class="long" />
<p>Email Address</p>
<input name="email" type="text" class="long" /><br />
<p style="padding-top:5px; display:block;"><input name="m21" type="radio" value="m21" id="m21" /> I Certify That I Am 21 Years Or Older </p>
</div>
</div>
<!-- Start of register div -->
</td>
<td><img src="images/spacer.gif" width="1" height="105" border="0" alt="" /></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><img name="flat_r5_c1" src="images/flat_r5_c1.jpg" width="209" height="188" border="0" id="flat_r5_c1" alt="" /></td>
<td rowspan="2" colspan="2"><img name="flat_r5_c3" src="images/flat_r5_c3.jpg" width="224" height="188" border="0" id="flat_r5_c3" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="187" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="6"><img src="images/flat_r7_c1.jpg" alt="" name="flat_r7_c1" width="524" height="32" border="0" usemap="#flat_r7_c1Map" id="flat_r7_c1" /></td>
<td>
<input type="image" src="images/flat_r7_c7.jpg" width="123" height="32" border="0" alt="SUBMIT!">
</td>
<td colspan="2"><img name="flat_r7_c8" src="images/flat_r7_c8.jpg" width="323" height="32" border="0" id="flat_r7_c8" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="32" border="0" alt="" /></td>
</tr>
</form>