Hi joefawcett thank you for your time...
I initially thoght there may be a syntax issue which was why I was getting the 'objject required' script error which is occuring on thr one single line of code I posted. It appears however thats not the case after I stripped it appart. That line of code is inside a couple of For loops:
Code:
function updateTotalsBT() {
var i=0;
var j=1;
updateForm.btST.value = 0;
for (i=0;i<4;i++) {
document.getElementById("btT" + i).value = 0;
}
for (j=1;j<=6;j++) {
document.getElementById("bt" + j).value = 0;
document.getElementById("ST" + j).value = Number(document.getElementById("nt" + j).value) + Number(document.getElementById("lt" + j).value);
for (i=0;i<4;i++) {
document.getElementById("bt" + j).value = Number(document.getElementById("bt" + j).value) + Number(document.getElementById("bt" + j + i).value); //Horiz Totals
document.getElementById("btT" + i).value = Number(document.getElementById("btT" + i).value) + Number(document.getElementById("bt" + j + i).value); //Vert Totals
updateForm.btST.value = Number(updateForm.btST.value) + Number(document.getElementById("bt" + j + i).value);
document.getElementById("ST" + j).value = Number(document.getElementById("ST" + j).value) + Number(document.getElementById("bt" + j + i).value);
if (Number(document.getElementById("bt" + j + i).value)>0) {
document.getElementById("bt" + j + i).style.background = '#FCF3C4';
}
}
}
updateForm.ST.value = Number(updateForm.btST.value) + Number(updateForm.ntST.value) + Number(updateForm.ltST.value);
}
I do beleive my issue is a form filed name which the function is dynamicly creating does not exist on the page. The page is a timesheet. the:
for (j=1;j<=6;j++)
part of the code goes over the Monday - Sunday input boxes and simplt totals the sums onFocus/onBlur.
I ahve a html version of the page that the ASP code generates here:
http://www.framegroup.com.au/portals.../Timesheet.htm
my issue is when the focus goes on Mon 16 May input field to enter a value its throwing the object required on line 21 (which is the line i originally posted)
Am a bit stuck
TYIA