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

Uncheck a box

Participant ,
Dec 30, 2022 Dec 30, 2022

Copy link to clipboard

Copied

I have two checkboxs. If the first is not check, the second can't be checked. Based on the value of the fist box I would like to turn off the second box.

 

v1=getField("First Box")

v2=getField("Second Box")

if (v1!="Yes" // how do I uncheck v2????

 

Thanks all.

TOPICS
JavaScript

Views

457

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
Community Expert ,
Dec 30, 2022 Dec 30, 2022

Copy link to clipboard

Copied

If you want to disable second checkbox while first checkbox is not checked use this as 'Mouse UP' event of "First Box":

this.getField("Second Box").readonly = event.target.value == "Off" ? true : false;

 

Votes

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
Participant ,
Jan 07, 2023 Jan 07, 2023

Copy link to clipboard

Copied

LATEST

Yes. Thank you.

Votes

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