N!ck
02-17-2003, 08:45 PM
<script language="javascript">
<!--
function validate(theform) {
if (theform.linktitle.value=="" || theform.linkurl.value=="" || theform.linkdesc.value=="") {
alert("Please complete the title, address, and description fields.");
return false; }
elseif (theform.linkdesc.length>80) {
alert("The link description is not to exceed 80 characters.");
return false; }
else { return true; }
}
//-->
</script>
That returns true no matter what (yes, I made sure and put onSubmit="return validate(this)" in the form tag). Any ideas?
<!--
function validate(theform) {
if (theform.linktitle.value=="" || theform.linkurl.value=="" || theform.linkdesc.value=="") {
alert("Please complete the title, address, and description fields.");
return false; }
elseif (theform.linkdesc.length>80) {
alert("The link description is not to exceed 80 characters.");
return false; }
else { return true; }
}
//-->
</script>
That returns true no matter what (yes, I made sure and put onSubmit="return validate(this)" in the form tag). Any ideas?