Menu
Why can I not directly change a textbox’s value in code, if I know the name of it? The following throws a “document.frmData.txtOverFlow” is not an object error
if (monthTotal2 > dMonth) {
//this is where I put together the name of the textbox
var txtOverFlow = “Ovr-” + RowData + “-” + matches2
//this line throws the error
document.frmData.txtOverFlow.value = monthTotal2 – dMonth
}
In this case, the name of the textbox is “Ovr-100-12”, which is what is assigned to txtOverFlow.
I know I could loop through every element in the form and find the element that matches by name, but that takes too long.
thanks!