I have 3 checkboxes and each checkbox returns different numerical values in a table. However, I want to add another option so that if both 'covidBtn' AND 'secondPropBtn' are selected, it will return 'secondCovidBuyer' values. I would really appreciate it if anyone is able to help me! Thank you.
Return Values
// Different tax percentages and taxBand data
standBuyer: [0, 0.02, 0.05, 0.05, 0.05, 0.10, 0.12],
firstBuyer: [0, 0, 0, 0.05],
secBuyer: [0.03, 0.05, 0.08, 0.08, 0.08, 0.13, 0.15],
covidBuyer: [0, 0, 0, 0, 0.05, 0.10, 0.12],
secondCovidBuyer: [0.03, 0.03, 0.03, 0.03, 0.08, 0.13, 0.15],
taxBand: [0, 125000, 250000, 300000, 500000, 925000, 1500000, Infinity],
Function
getBuyerType: function() {
if (document.getElementById(DOMstrings.firstTimeBtn).checked == true) {
return 'firstBuyer';
} else if (document.getElementById(DOMstrings.secondPropBtn).checked == true) {
return 'secBuyer';
} else if (document.getElementById(DOMstrings.covidBtn).checked == true) {
return 'covidBuyer';
} else {
return 'standBuyer';
}
},
Aucun commentaire:
Enregistrer un commentaire