[font][/font]
Sorry, my English
I have been trying for weeks to make my form work without success
I have to sum up several text fields if Radios group is "yes"
Help!!!!
js
window .addEvent ( 'domready' , function () {
$ ( 'field_radios' ) .addEvent ( 'change' , checkYes);
op('#1').on('change', operazione);
op('#2').on('change', operazione);
op('#3').on('change', operazione);
op('#4').on('change', operazione);
function checkYes () {
if ($ ( 'field_radios17' ) .checked === "yes") {
function operazione ()
{
var 1= Number (op('#bambini').val());
var 2= Number (op('#adulti').val());
var 3= Number (op('#transfer').val());
op('#4').val((( 1+ 2) * 3).toFixed(2));
}
}
}
}
Sorry, my English
I have been trying for weeks to make my form work without success
I have to sum up several text fields if Radios group is "yes"
Help!!!!
js
window .addEvent ( 'domready' , function () {
$ ( 'field_radios' ) .addEvent ( 'change' , checkYes);
op('#1').on('change', operazione);
op('#2').on('change', operazione);
op('#3').on('change', operazione);
op('#4').on('change', operazione);
function checkYes () {
if ($ ( 'field_radios17' ) .checked === "yes") {
function operazione ()
{
var 1= Number (op('#bambini').val());
var 2= Number (op('#adulti').val());
var 3= Number (op('#transfer').val());
op('#4').val((( 1+ 2) * 3).toFixed(2));
}
}
}
}