Hi Everyone,
I am not sure why the following code is not stopping the page from processing. Any help would be appreciated.
<script language=”JavaScript” type=”text/javascript”>
function checkform ( detailsform )
{
if (document.detailsform.FirstName.value == “”) {
alert( “Please enter your first name.” );
document.detailsform.FirstName.value();
return false ;
}
</script>
THE FORM:an extract
<form method=”post” name=”detailsform” onSubmit= “checkform(this)”
action=”
<input type=hidden name=”recipient”
value=”seminars@
<input type=hidden name=”subject” value=”Seminar Enrolment”>
<input type=hidden name=”redirect”
value=”
<input type=hidden name=”env_report”
value=”REMOTE_HOST,HTTP_USER_AGENT”>
<input type=”hidden” name=”course” value=”$fields{SeminarEmail}”>
<tr>
<td width=8> </td>
<td width=”300″>
<p><font color=”#00549a”><b><font face=”arial, geneva” size=”2″>
<font color=”#FFFFFF”> </font>Course Name:
</font></b></font></p>
</td>
<td width=”300″> <font face=Arial size=2><select name=”Course
Name”>
<option selected
value=”$fields{txtSeminarName}”>$fields{txtSeminarName}</option>
</select>
</font> </td>
<td height=”27″ width=”12″> </td>
</tr>
<tr>
<td width=8> </td>
<td width=”300″>
<p><font color=”#00549a”><b><font face=”arial, geneva” size=”2″>
<font color=”#FFFFFF”> </font>Starting Date:
</font></b></font></p>
</td>
<td width=”300″> <font face=Arial size=2><select
name=”SeminarDate”>
<option selected value=”$fields{txtDateOne}”>$fields{txtDateOne}</option>
<option value=”$fields{txtDateTwo}”>$fields{txtDateTwo}</option>
</select>
</font></td>
<td width=”12″> </td>
</tr>
<tr>
<td width=8 height=”29″> </td>
<td height=”29″ width=”300″><font color=#00549a size=2 face=arial>
<b>Title:</b></font></td>
<td height=”29″ width=”300″><font size=2 face=arial>
<input type=”radio” name=”Title” value=”Dr”>
Dr
<input type=”radio” name=”Title” value=”Mr”>
Mr
<input type=”radio” name=”Title” value=”Mrs”>
Mrs
<input type=”radio” name=”Title” value=”Ms”>
Ms
<input type=”radio” name=”Title” value=”Miss”>
Miss</font></td>
<td height=”29″ width=”12″> </td>
</tr>
<tr>
<td width=8> </td>
<td colspan=2><font color=#00549a size=2 face=arial>
<b>Personal Details:</b></font></td>
<td width=”12″> </td>
</tr>
<tr>
<td width=8> </td>
<td align=right width=”300″> <font size=2 face=arial>First
name: </font></td>
<td width=”300″><font size=2 face=arial>
<input type=text name=FirstName size=30>
</font></td>
<td width=”12″> </td>
</tr>