Dialog Box Button Help

Community Beginner ,
Mar 30, 2020

Copy link to clipboard

Copied

Okay so I'm new to programming within adobe acrobat. Im trying to execute a function once the ok button is clicked in the dialog box. 

the button is created in json.

which it looks like 

{
type: "ok",
ok_id: "SubButton",
ok_name: "Submit",
value: Submint(),
alignment: "align_right",
}

I have no Idea how to even attempt this ive tried googling but coming very short all the time. 

TOPICS
Acrobat SDK and JavaScript

Views

37

Likes

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

Dialog Box Button Help

Community Beginner ,
Mar 30, 2020

Copy link to clipboard

Copied

Okay so I'm new to programming within adobe acrobat. Im trying to execute a function once the ok button is clicked in the dialog box. 

the button is created in json.

which it looks like 

{
type: "ok",
ok_id: "SubButton",
ok_name: "Submit",
value: Submint(),
alignment: "align_right",
}

I have no Idea how to even attempt this ive tried googling but coming very short all the time. 

TOPICS
Acrobat SDK and JavaScript

Views

38

Likes

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
Mar 30, 2020 0
Adobe Community Professional ,
Mar 30, 2020

Copy link to clipboard

Copied

What happens when you use the button?

Ihave never seen a property with the name "ok_id".

Likes

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
Reply
Loading...
Mar 30, 2020 0
Adobe Community Professional ,
Mar 30, 2020

Copy link to clipboard

Copied

Hi,

 

Can you elaborate more what are you trying to achieve when the button is pressed?

 

What exactly is the action that you need to execute?

Likes

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
Reply
Loading...
Mar 30, 2020 0
Adobe Community Professional ,
Mar 31, 2020

Copy link to clipboard

Copied

Well, you need a whole dialog object definition and a script to make that work. Is this just a slice of you're complete code?

There are two functions you can define in the Dialog Object that are run after the OK button is pressed, commit and validate.  However, you may want to run your function after the dialog exits with a status code of "ok" rather then on the ok button itself. 

What exactly are you trying to accomplish?

You'll find an online dialog object designer (paid for), as well as examples, and some video tutorials on creating dialogs, Here:

https://www.pdfscripting.com/public/ACRODIALOGS-OVERVIEW.cfm

 

 

Likes

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
Reply
Loading...
Mar 31, 2020 0