}
display( totalfee );
});
+ cj('#additional_participants').change( function( ) {
+ display( totalfee );
+ });
+
display( totalfee );
break;
display( totalfee );
});
+
+ cj('#additional_participants').change( function( ) {
+ display( totalfee );
+ });
+
display( totalfee );
break;
cj(this).bind( 'keyup', function() { calculateText( this );
}).bind( 'blur' , function() { calculateText( this );
});
+
+ cj('#additional_participants').change( function( ) {
+ display( totalfee );
+ });
+
display( totalfee );
break;
}
display( totalfee );
});
+
+ cj('#additional_participants').change( function( ) {
+ display( totalfee );
+ });
+
display( totalfee );
break;
}
//display calculated amount
function display( totalfee ) {
- var totalEventFee = formatMoney( totalfee, 2, seperator, thousandMarker);
+ num_participants = cj('#additional_participants').val()
+
+ if(!num_participants) {
+ num_participants = 0
+ }
+ // The value of this field is the number of *additional* participants
+ // What is displayed to the user is 1 + the value, because it is including
+ // the "yourself". Since we want to give a total, including "yourself" we have
+ // to add one to the value of #additional_participants.
+ num_participants++;
+
+ var totalEventFee = formatMoney( totalfee * num_participants, 2, seperator, thousandMarker);
document.getElementById('pricevalue').innerHTML = "<b>"+symbol+"</b> "+totalEventFee;
scriptfee = totalfee;
scriptarray = price;