you could check if the value returned from CGI->param('fieldname') is empty by using the length function
if length($cgi->param('fieldname')) == 0 (that means the field is empt
+y.)
To check if the value is 0, how about :
if ($CGI->param('fieldname') == 0)...
Option 2: if u want to use Javascript, then this might work:
<html
<head>
<script language="Javascript">
function chkinput(objForm) {
if (objForm.inputfield.value == "") {
objForm.fld_has_value_or_not.value = "N"
} else {
objForm.fld_has_value_or_not.value = "Y"
}
objForm.submit();
return true;
}
</script>
</head>
<body>
<form name="testfrm" method="post" action="cgifile.cgi" onSubmit="retu
+rn chkinput(this);">
<input type=hidden name=fld_has_value_or_not value="">
<input type="text" name="inputfield" value="">
<input type=submit value="Submit">
</form>
</body>
</html>
in this case, if the input field is empty, the hidden variable will be set to "Y", which can be checked by the cgi file and processed accordingly...
hth...