Hi,
I am not a js programmer, but I found a script example for counting fields of my form.
In the form it is possible to add the names of max 6 people.
All of these people can select an other membership. So the prise is different.
At the end of the form the visitor will press the submit button.
At the "thank you" message I wil show the total amount of the 6 fields.
I have placed this script in the on load event:
At the end of the script, the amount is ready as 'bedrag'.
But when I show {bedrag} in the message text, only {bedrag} is shown in the text.
What can I do to show the amount the vistor have to pay in the message text?
I am not a js programmer, but I found a script example for counting fields of my form.
In the form it is possible to add the names of max 6 people.
All of these people can select an other membership. So the prise is different.
At the end of the form the visitor will press the submit button.
At the "thank you" message I wil show the total amount of the 6 fields.
I have placed this script in the on load event:
window.addEvent('domready', function() {
function startCalc(){
//interval = setInterval("calc()",1);
calc();
}
function calc(){
if (document.getElementById){
een = document.getElementById('abo_keuze01').value;
twee = document.getElementById('abo_keuze02').value;
drie = document.getElementById('abo_keuze03').value;
vier = document.getElementById('abo_keuze04').value;
vijf = document.getElementById('abo_keuze05').value;
zes = document.getElementById('abo_keuze06').value;
document.getElementById('bedrag').value = (een * 1) + (twee * 1) + (drie * 1) + (vier * 1) + (vijf * 1) + (zes * 1);
}
}
function stopCalc(){
clearInterval(interval);
}
});
At the end of the script, the amount is ready as 'bedrag'.
But when I show {bedrag} in the message text, only {bedrag} is shown in the text.
What can I do to show the amount the vistor have to pay in the message text?