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

Check Box

Community Beginner ,
Dec 12, 2018 Dec 12, 2018

Hi,

I'm a beginner of JavaScript.

Does anyone know, how to create a checkbox with some text. I've tried this below script, but it was not work.

var myDialog = app.dialogs.add ({name:"sample"});

with (myDialog.dialogColumns.add())

{

    var myCheckBoxField = checkbox.add ({"ABC"});

    }

var myResult = myDialog.show ();

Regards,

KPS

TOPICS
Scripting
1.6K
Translate
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

correct answers 1 Correct answer

Community Expert , Dec 12, 2018 Dec 12, 2018

Hi Karuppasamy,

Try the following

var myDialog = app.dialogs.add ({name:"sample"});

with (myDialog.dialogColumns.add())

{

     var myCheckBoxField = checkboxControls.add ();

     myCheckBoxField.staticLabel = "ABC"

}

var myResult = myDialog.show ();

-Manan

Translate
Community Expert ,
Dec 12, 2018 Dec 12, 2018

Hi Karuppasamy,

Try the following

var myDialog = app.dialogs.add ({name:"sample"});

with (myDialog.dialogColumns.add())

{

     var myCheckBoxField = checkboxControls.add ();

     myCheckBoxField.staticLabel = "ABC"

}

var myResult = myDialog.show ();

-Manan

Translate
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 Beginner ,
Dec 14, 2018 Dec 14, 2018
LATEST

Hi Manan,

Thank you so much

It's working perfect!

Translate
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
Guru ,
Dec 13, 2018 Dec 13, 2018

Unless you have a good reason you should probably use SUI instead of app dialogs.

They are easier to work with.

Peter Kahrel has a good guide to them.

ScriptUI for dummies | Peter Kahrel

There's also a chapter in the tools kit guide. There's a link to the guide in the help menu of the ESTK (if that's still working by you:)

Translate
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