BiggerBrother
Technical User
I don't know if this is possible, but is it possible to iterate through the following:
I have a selection of textboxes, making up a form. One of the groups of boxes is named: textbox[quantity], where i is a varible.
Currently I have the following:
var sum = 0;
var quantity = document.getElementsByName('textbox');
for(var i=0; i<quantity.length; i++)
{
sum = sum + quantity[quantity].value;
}
document.create_order.total_quantity.value=sum;
}
At the moment, quantity.length always returns 0.
Many thanks for any ideas or thoughts,
BB
I have a selection of textboxes, making up a form. One of the groups of boxes is named: textbox[quantity], where i is a varible.
Currently I have the following:
var sum = 0;
var quantity = document.getElementsByName('textbox');
for(var i=0; i<quantity.length; i++)
{
sum = sum + quantity[quantity].value;
}
document.create_order.total_quantity.value=sum;
}
At the moment, quantity.length always returns 0.
Many thanks for any ideas or thoughts,
BB