• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Radio Button Troubles.

Advocate ,
Jun 09, 2017 Jun 09, 2017

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);

      }

TOPICS
Scripting

Views

154

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation