ok- this works:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="iso-8859-1">
</head>
<body>
<SCRIPT language=JavaScript>
<!--
function FormValidator(theForm)
{
if (theForm.npass.value == ""

{ alert("Please enter a value for the \"npass\" field."

;
theForm.npass.focus(); return (false);
}
if (theForm.Name.npass.length < 3)
{ alert("Please enter at least 3 characters in the \"npass\" field."

;
theForm.npass.focus(); return (false);
}
if (theForm.npass2.value == ""

{ alert("Please enter a value for the \"npass2\" field."

;
theForm.npass2.focus(); return (false);
}
if (theForm.opass.value == ""

{ alert("Please enter a value for the \"opass\" field."

;
theForm.opass.focus(); return (false);
}
return (true);
}
//--></SCRIPT>
<Form method=post onsubmit="return FormValidator(this)" action=$rootdir/cgi-bin/user/prefchangep.pl>
<br>New Password:
<label for="_npasso"><Input name=npass id="_npass" size=30 maxlength=15>
<br>New Password Again:
<label for="_npass2"><Input name=npass2 id="_npass2" size=30 maxlength=15>
<br>Old Password:
<label for="_opass"><Input name=opass id="_opass" size=30 maxlength=15>
<br>
<br><INPUT type=submit value="Change Password"><INPUT type=reset value="Reset Password">
</form>
in html....
but i need it to work in perl/cgi
in other words if i use it in pref.html it works, but if i use it in pref.pl, it will not work.
since this is a perl form, how can i get it to work in perl?