Edit: I've changed the code as follows. Now none of the code seems to work. (Even my the code that did work and I didn't share with you.)
function berekeningAflostabel() {
var zaaksoortMsnp;
var AflostabelPerMaand;
document.getElementById("fldZaakSoortMsnp").addEventListener("change", function () {
AflostabelPerMaand = this.value;
if(AflostabelPerMaand == 1) {
zaaksoortMsnp = "Tekst1";
}
if(AflostabelPerMaand == 2) {
zaaksoortMsnp = "Tekst2";
}
if(AflostabelPerMaand == 3) {
zaaksoortMsnp = "Tekst3";
}
if(AflostabelPerMaand == 4) {
zaaksoortMsnp = "Tekst4";
}
if(AflostabelPerMaand == 5) {
zaaksoortMsnp = "Tekst5";
}
if(AflostabelPerMaand == 6) {
zaaksoortMsnp = "Tekst6";
}
document.getElementById("fldMinimaleAfloswaardePerMaand").value = zaaksoortMsnp;
}
}
var eventZaaksoortMsnp = document.getElementById("fldZaakSoortMsnp");
eventZaaksoortMsnp.addEventListener("change", berekeningAflostabel);
=vs==.0x(x is the number) or at least remove all theifs and do this:var AflostabelPerMaand = '0' + zaaksoortMsnp.value;!