I can't seem to get this to work. Any help appreciated. The alert
message always comes up.
Here is my code
<SCRIPT type="text/javascript">
function fte()
{
var hours = document.form1.hours.value //get user input for hours
var weekdays = document.form1.weekdays.value //get user input for days
in month
var rlength=2;
var result =
Math.round(hours/(weekdays*8)*Math.pow(10,rlength))/Math.pow(10,rlength);
if (document.form1.weekdays.value != 20 || 21 || 22 || 23)
{
alert ("The days in the month must be either 20, 21, 22, or 23");
}
else
{
alert ("Your fte is " + result);
}
}
</script>
<form name="form1">
Enter your hours: <input type="text" name="hours"> <br>
Enter the number of work days in the month: <input type="text"
name="weekdays"> <p>
<input type="submit" value = "Calculate" onClick="fte(this)"><p>
</form>
</BODY>
</HTML>