Hello all,
First post. And I got a good question.
I have to build this form. It needs to add up numbers on the fly (onChange).
However, we also are using ASP to submit the form and have developed an interested work standard in how to send information across
Since many elements belong to each other
ie. QTY, price, and description
I setup the form with a normal text field and 2 hidden fields to contain the information. They all share the same name so that ASP (and Javascript) can refer to those 3 fields as an array.
Now,
The problem is that I’m trying to process the javascript using a for loop. Kinda like this
[QUOTE]
var numberForms = document.form1.length;
for(i=0; i< numberForms; i++){
total= total + (document.form1.elements[i,0].value * document.form1.elements[i,1].value )
}
(the above doesn’t work but it’s an example trying to show a multidemensional array)
If I used a field like this
[quote]
document.form1.fieldName[0].value * document.form1.fieldName[1].value
then it’s fine.. but since I want to do it in a for loop, I can’t.
Is there a way to access this array using elements[] or a loop in someway?