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

Is it possible to simulate a button click?

New Here ,
Mar 25, 2016 Mar 25, 2016

Hi,

i want to click a button using a script in acrobat pro dc, how can i do this?

TOPICS
Acrobat SDK and JavaScript
886
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 , Mar 25, 2016 Mar 25, 2016

You can't press the button but you can imitate that action using this code:

this.resetForm(["Field1", "Field2", "Field3"]);

This will reset those three fields, for example.

Translate
LEGEND ,
Mar 25, 2016 Mar 25, 2016

That depends on exactly what the button action/s is/are. If whatever action you've assigned to the button can be done with JavaScript, you'd just run a script that does the same thing.

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
New Here ,
Mar 25, 2016 Mar 25, 2016

Hi, the button action is to reset the form (but not the whole form).

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 Expert ,
Mar 25, 2016 Mar 25, 2016

You can't press the button but you can imitate that action using this code:

this.resetForm(["Field1", "Field2", "Field3"]);

This will reset those three fields, for example.

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
LEGEND ,
Mar 26, 2016 Mar 26, 2016
LATEST

I would look at writing a document level function to perform that task and then call that function for the button  action or any place I need to perform that specific action.

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