|
My javascript skills have always stunk. I have a bunch of textboxes that I need to total up and insert the value of into another onChange and I'm not sure where to begin.
I need to integrate this with a shopping cart so I don't have any choice in naming the fields.
Sample textboxes that need to be totalled are:
<input type="text" size="2" name="option|white|TDG11" >WHITE<br>
<input type="text" size="2" name="option|black|TDG11">BLACK<br>
<input type="text" size="2" name="option|lt grey|TDG11">LT GREY<br>
(they're product colors and the text box indicates how many of each color).
The box that needs to get the total of all the other boxes would look like:
<input type="text" name="item-TDG11|1:3.25,10:2.95,50:2.45|Gutermann Thread-1100 yards|-|-|" size=4>
If I can't get the total of all the option boxes into the main qty box, it won't calculate the qty discount correctly. Ideally, that qty box would be editable, but it has to be a form field to pass to the cart.
Any help, guidance or code samples would be greatly appreciated. My normal programmer dude is having roomate problems and couldn't help me and I'm on a time crunch to get this done.
Deb
__________________
When you eliminate all other possibilities, what remains, no matter how improbable, is the answer.
|