Menu
Hi there, I have the following function:
[code]
function calculate(cnum){
price=parseFloat(document.frm1.size1.value)+parseFloat(document.frm1.base1.value);
document.frm1.price1.value=”£”+formatNumber(price);
}
I am looking for a way to replace size1, base1 and price1 with size+cnum, base+cnum, price+cnum;
That was I can call the function calculate(1) and it will check base1, price1 and size1. Then call calculate(2) to check base2, price2 and size2.
Any ideas?
Gaz.