[jQuery] calculate value of input based on two selects
hi guys,
just wondering how i would update the value of an input box to be the
value of the sum of two select (drop down boxes) plus 1.
i.e.
(select1.value * select2.value) + 1
I need to do this everytime either of the two fields are updated.
my pseudocode is:
select1.onUpdate{
total.value = (select1.value * select2.value) + 1;
}
select2.onUpdate{
total.value = (select1.value * select2.value) + 1;
}
if anyone can help me "translate" this to jquery i'd be mighty
relieved.
thanks,
alex