testing value of radio button

 2 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Joe O'Toole
Veteran Member
Posts: 314
Veteran Member
    I rarely use radio buttons in DS and having an issue with the value test. My "lawgetform" test works for other fields but is not working to test the value of my 2 element radio button. I've got an "X" value assigned in the button def but when I test the value the form blows up. Can anyone provide an example? Here is my code that checks the button value, another field value and display an error accordingly:

    if (lawForm.getFormValue("radiobutton_name") = "X") {
        if (lawForm.getFormValue("FIELD") > "799") {
       alert("FIELD must be < 800");
       return;
        }
      }
    Eric Lopez
    New Member
    Posts: 1
    New Member
      Hey Joe - two items. I don't do Lawson anymore, but I would like to help if I can. If that is the actual JavaScript...

      Your "test" for X should be double == signs, a single = sign will attempt to assign the value.

      What is the actual error? You mentioned blow up.
      Joe O'Toole
      Veteran Member
      Posts: 314
      Veteran Member
        Thanks Eric, that was it. So simple I overlooked it!
        Joe