2 Replies Latest reply on Feb 29, 2008 3:55 PM by Ramon F Herrera

    How to differentiate between Radio Buttons with the same name?

    Ramon F Herrera Level 1
      My form has two fields, to which I gave the same name ("Radio Button 1.0") in order to achieve mutual exclusivity.

      Now, I would like to use JavaScript to retrieve the value of one the two fields:

      var checkMark = this.getField("Radio Button1.0");
      if (checkMark.value == "Yes") {
      [...]
      }

      Questions:

      What is the proper way to inspect the value of a Radio Button? I have tried this:

      if (checkMark.value == "No") [...]

      but it doesn't seem to work.

      How can I tell apart 2 radio buttons with the same name?

      TIA,

      -RFH