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.
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.
Copy link to clipboard
Copied
What happens when you use the button?
Ihave never seen a property with the name "ok_id".
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?
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