ChrisQuick
Programmer
I getting an error line 44 "Object expected" message with this code. I don't see what the problem is. Can anyone help
Here is the script:
<script language="javascript">
function Validate(frm){
if(frm.txtTitle.value==""
{ alert("Please enter a project title."
frm.txtTitle.focus();
return false;
}
else if (frm.txtUser.value==""
{ alert("Please enter the user."
frm.txtUser.focus();
return false;
}
else if (frm.txtFY.value==""
{ alert("Please enter the Fiscal Year."
frm.txtFY.focus();
return false;
}
else if (frm.txtContractDollars.value==""
{ alert("Please enter the Contract Amount."
frm.txtContractDollars.focus();
return false;
} <----Line 44
else if (isNAN(frm.txtContractDollars.value))
{ alert("Contract Amount must be numbers."
frm.txtContractDollars.focus();
return false;
}
else if (frm.txtFacID.value == ""
{ alert("Please enter the Facility ID."
frm.txtFacID.focus();
return false;
}
else if (frm.txtUserWrkNo.value==""
{ alert("Please enter the Work Order Number."
frm.txtUserWrkNo.focus();
return false;
}
else if (isNAN(frm.txtUserWrkNo.value))
{ alert("Work Order Numbers must be numbers."
frm.txtUserWrkNo.focus();
return false;
}
else
{
return true;
}
}
</script>
Here is the script:
<script language="javascript">
function Validate(frm){
if(frm.txtTitle.value==""
{ alert("Please enter a project title."
frm.txtTitle.focus();
return false;
}
else if (frm.txtUser.value==""
{ alert("Please enter the user."
frm.txtUser.focus();
return false;
}
else if (frm.txtFY.value==""
{ alert("Please enter the Fiscal Year."
frm.txtFY.focus();
return false;
}
else if (frm.txtContractDollars.value==""
{ alert("Please enter the Contract Amount."
frm.txtContractDollars.focus();
return false;
} <----Line 44
else if (isNAN(frm.txtContractDollars.value))
{ alert("Contract Amount must be numbers."
frm.txtContractDollars.focus();
return false;
}
else if (frm.txtFacID.value == ""
{ alert("Please enter the Facility ID."
frm.txtFacID.focus();
return false;
}
else if (frm.txtUserWrkNo.value==""
{ alert("Please enter the Work Order Number."
frm.txtUserWrkNo.focus();
return false;
}
else if (isNAN(frm.txtUserWrkNo.value))
{ alert("Work Order Numbers must be numbers."
frm.txtUserWrkNo.focus();
return false;
}
else
{
return true;
}
}
</script>