Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

check a radio button with Javascript

  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177494 by BaranD
check a radio button with Javascript was created by BaranD
Hello,


Is the following syntax correct to check a radio button with JavaScript?

$("#answer237485X65X532JN2").text('JN2');



The following does work to retrieve the value:

$("#answer237485X65X530JN2").val();


Kind regards,

Baran
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177502 by DenisChenu
Replied by DenisChenu on topic check a radio button with Javascript
learn.jquery.com/using-jquery-core/faq/h...put-or-radio-button/

$("#answer{SGQ}JN2") if you are inside a question text.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: BaranD
The topic has been locked.
  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177504 by BaranD
Replied by BaranD on topic check a radio button with Javascript
Thank you! I got it working
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose