I have this form with a JS function to verify that there are no blank fields,
but it doesn't work.
<head>
<script language='javascript'>
function verifyForm(){
var msg='';
if(document.getElementById('field1').value==''){msg+='Field 1 \n';}
if(document.getElementById('field2').value==''){msg+='Field 2 \n';}
if(msg!=''){
alert('The following entries are empty:\n\n'+msg);
return false
}else{
return true }
}
</script>
</head>
<body>
<form name="frmRequest2" id="frmRequest2" action="<? echo $submitURL2; ?>" method="post" onsubmit='return verifyForm();'>
Please answer all questions and enter "NONE" where appropriate.
<table>
<tbody>
<tr>
<th>List any items you already have</th>
<th>List any items you need to get</th>
</tr>
<tr>
<td><textarea name="field1" id="field1" rows="2" cols="39"> <? echo $field1; ?> </textarea></td>
<td><textarea name="field2" id="field2" rows="2" cols="39"> <? echo $field2; ?> </textarea></td>
</tr>
<tr>
<td colspan="4" align="center" valign="top" style="border-width: 0px 0px 0px 0px;"> <br />
<input name="submit" value="Submit Data" type="submit"/> </td>
</tr>
</tbody>
</table>
</form>
</body>