Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help find the error please!!

Status
Not open for further replies.

ChrisQuick

Programmer
Oct 4, 1999
144
US
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=&quot;javascript&quot;>

function Validate(frm){
if(frm.txtTitle.value==&quot;&quot;)
{ alert(&quot;Please enter a project title.&quot;);
frm.txtTitle.focus();
return false;
}
else if (frm.txtUser.value==&quot;&quot;)
{ alert(&quot;Please enter the user.&quot;);
frm.txtUser.focus();
return false;
}
else if (frm.txtFY.value==&quot;&quot;)
{ alert(&quot;Please enter the Fiscal Year.&quot;);
frm.txtFY.focus();
return false;
}
else if (frm.txtContractDollars.value==&quot;&quot;)
{ alert(&quot;Please enter the Contract Amount.&quot;);
frm.txtContractDollars.focus();
return false;
} <----Line 44
else if (isNAN(frm.txtContractDollars.value))
{ alert(&quot;Contract Amount must be numbers.&quot;);
frm.txtContractDollars.focus();
return false;
}
else if (frm.txtFacID.value == &quot;&quot;)
{ alert(&quot;Please enter the Facility ID.&quot;);
frm.txtFacID.focus();
return false;
}
else if (frm.txtUserWrkNo.value==&quot;&quot;)
{ alert(&quot;Please enter the Work Order Number.&quot;);
frm.txtUserWrkNo.focus();
return false;
}
else if (isNAN(frm.txtUserWrkNo.value))
{ alert(&quot;Work Order Numbers must be numbers.&quot;);
frm.txtUserWrkNo.focus();
return false;
}
else
{
return true;
}
}
</script>
 
Javascript is case-sensitive.

isNAN should be isNaN

A 2nd pair of eyes sometimes helps,

Rob
robschultz@yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

&quot;Focus on the solution to the problem,

not the obstacles in the way.&quot;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top