Thanks for the quick response! Here's the code we're fighting with. We believe the problem is in the very last line of the code.
Thanks for any help you can provide!
---------------------------------------------------
<SCRIPT language=JavaScript>
function sumBillable() {
with(document.all)
{
if (isNaN(oSatHrs.value)) {
oSatHrs.Value = 0.00;
}
if (isNaN(oSunHrs.value)) {
oSunHrs.Value = 0.00;
}
if (isNaN(oMonHrs.value)) {
oMonHrs.Value = 0.00;
}
if (isNaN(oTueHrs.value)) {
oTueHrs.Value = 0.00;
}
if (isNaN(oWedHrs.value)) {
oWedHrs.Value = 0.00;
}
if (isNaN(oThuHrs.value)) {
oThuHrs.Value = 0.00;
}
if (isNaN(oFriHrs.value)) {
oFriHrs.Value = 0.00;
}
var satHrs = parseFloat(oSatHrs.value);
var sunHrs = parseFloat(oSunHrs.value);
var monHrs = parseFloat(oMonHrs.value);
var tueHrs = parseFloat(oTueHrs.value);
var wedHrs = parseFloat(oWedHrs.value);
var thuHrs = parseFloat(oThuHrs.value);
var friHrs = parseFloat(oFriHrs.value);
if ( satHrs < 0 || satHrs > 24) {
alert("Saturday Hours: Please Enter a value between 0 and 24"
return;
}
if (sunHrs < 0 || sunHrs > 24) {
alter("Sunday Hours: Please Enter a value between 0 and 24"
return;
}
if (monHrs < 0 || monHrs > 24) {
alter("Monday Hours: Please Enter a value between 0 and 24"
return;
}
if (tueHrs < 0 || tueHrs > 24) {
alter("Tuesday Hours: Please Enter a value between 0 and 24"
return;
}
if (tueHrs < 0 || tueHrs > 24) {
alter("Wednesday Hours: Please Enter a value between 0 and 24"
return;
}
if (sunHrs < 0 || sunHrs > 24) {
alter("Thursday Hours: Please Enter a value between 0 and 24"
return;
}
if (sunHrs < 0 || sunHrs > 24) {
alter("Friday Hours: Please Enter a value between 0 and 24"
return;
}
oSumHrs.value = satHrs + sunHrs + monHrs + tueHrs + wedHrs + thuHrs + friHrs;
}
}
</SCRIPT> [sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
please be aware that (document.all) ONLY works for IE,
for netscape, try "document.layer"
[sig]<p>Chiu Chan<br><a href=mailto:cchan@gefmus.com>cchan@gefmus.com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.