Copy link to clipboard
Copied
Hello I have 3 radio buttons. When one is selected English, E/F or E/S will Be placed before ©. Each works fine Until i hit all 3 then it displays all 3 in front of the ©. For instance if i Click on English(on accident) and then hit E/F it displays both --- English E/F © when it should just be E/F ©
var RBT = function(p, label, v, callback) {
var rbt = p.add('radiobutton', undefined, label);
rbt.onClick = function() {
ev.dispatchEvent ( (rbt.value? "ADD_ACTION":"REMOVE_ACTION"), {label:label, callback:callback} );
}
return rbt;
};
new RBT ( p6, 'ENGLISH', false, cb20CallBack );
new RBT ( p6, 'E/F', false, cb21CallBack );
new RBT ( p6, 'E/S', false, cb22CallBack );
function cb20CallBack(target){
findProps = {findWhat:"~2",}
changeProps = { changeTo:"ENGLISH ~2",}
grep(target, findProps, changeProps);
}
function cb21CallBack(target){
findProps = {findWhat:"~2",}
changeProps = { changeTo:"E/F ~2",}
grep(target, findProps, changeProps);
}
function cb22CallBack(target){
findProps = {findWhat:"~2",}
changeProps = { changeTo:"E/S ~2",}
grep(target, findProps, changeProps);
}
Have something to add?