Could someone please tell me where I am going wrong with the following :-
function CalcPrice(form) {
var a=(form.lstmemtype.options[form.lstmemtype.selectedIndex].value)
var b=(form.lstmemterm.options[form.lstmemterm.selectedIndex].value)
var c=[0,0,120,340,550,950,70,160,320,550,40,100,180,350]
var d = a+b
form.txtprice.value="£" + d
}
There is 3 values in A - 1,5,9
There is 4 values in B - 1,2,3,4
I want to add A+B together and insert the corresponding value from array c into form.txtprice.value also adding the "£" sign to the beginning.
If I am doing this the wrong way could someone please point me in the right direction.
Many Thanks,
SRThomson
function CalcPrice(form) {
var a=(form.lstmemtype.options[form.lstmemtype.selectedIndex].value)
var b=(form.lstmemterm.options[form.lstmemterm.selectedIndex].value)
var c=[0,0,120,340,550,950,70,160,320,550,40,100,180,350]
var d = a+b
form.txtprice.value="£" + d
}
There is 3 values in A - 1,5,9
There is 4 values in B - 1,2,3,4
I want to add A+B together and insert the corresponding value from array c into form.txtprice.value also adding the "£" sign to the beginning.
If I am doing this the wrong way could someone please point me in the right direction.
Many Thanks,
SRThomson
Comment