Copy link to clipboard
Copied
Designing a program to slim down paperwork.
Dynamically creating a form to select which paperwork to combine.
FROM FOLDER LEVEL SCRIPT:
function addGenerateButton()
{
var g = myDoc.addField("Generate", ....);
g.setAction("MouseUp", "myButtonAction();");
}
function myButtonAction()
{
....
}
How do I do this? Should I do this? Is there a better way to do this?
Copy link to clipboard
Copied
Better question:
Is it possible to pass variables from a folder level script into a document level?
For example, I define string1 at folder level.
I need string1 to be available to a document level script.
Is this possible?
Copy link to clipboard
Copied
Nevermind........
Copy link to clipboard
Copied
Yes, that is possible.
I don't see where you've defined myDoc in your code, though.
Copy link to clipboard
Copied
It's a global earlier up in the folder script.
I guess my question boils down to, how do I make a button execute a custom function when pressed? What's the easiest way to do this?
Copy link to clipboard
Copied
The easiest, and only, way to do that is to call the function by its name, like this:
addGenerateButton();