I'm having trouble creating a total and passing the result to Paypal, or anywhere else.
Here is the situation: I have and event, and there are three checkboxes on the form. What is checked determines the price charged for the event. I have a hidden field named Total into which I want to put the total amount, and use that for sending the total to Paypal. I have the initial value set in this field to 389.
I have the following code:
function CalcFormTotal() {
var n;
n=389;
var re = document.getElementById('dnn_ctr498_DynamicForms_Responses_3f55602e-0a71-4482-978d-fc605f12963c');
var sc = document.getElementById('dnn_ctr498_DynamicForms_Responses_e36d3527-9b60-4071-ad99-4d8ed19dc2ac');
var st = document.getElementById('dnn_ctr498_DynamicForms_Responses_daa1ef7e-d3cf-4713-b1e6-59fb3a5ebf4b');
if( sc.checked) n=379;
if( st.checked) n=359
var tot = document.getElementById('dnn_ctr498_DynamicForms_Responses_006c46a3-baa1-4ed0-89bd-4b8a9b444151');
tot.innerText = n;
}
This is added as custom javascript. I also added a call to this routine in the javascript section when the submit button is clicked.
All of this works just fine, except that the total isn't set up correctly.
Actually, if I view the form in IE, this works correctly. But, neither Firefox nor Chrome do this correctly. It appears that these browsers don't support InnerText, or something.
Can someone help?