Copy link to clipboard
Copied
Good morning,
I have to create a "checklist" for our office and would like to add a text frame with a onClick event behaviour. My idea is that
after exporting as an interactive PDF file the user can click (or double-click, doesn't matter) on this specific frame and it should
auto-complete this field with date and the windows login name. Is this possible and if yes, how can I do this?
What I've got so far is this command
--> alert($.getenv("USERNAME"));
which returns the actual logged in user but I'm struggeling with the onClick event (javascript is not really my business)
Thank you in advance
Kind regards
Moritz
Copy link to clipboard
Copied
Acrobat scripting is based on JavaScript but is totally different to the stuff you use in a web page, and the Acrobat security model prevents a script embedded in a document from reading any properties of the user identity object.
Copy link to clipboard
Copied
I could just read the date and time but not the username? Not what I need but better than nothing.
Can you (or someone else) demonstrate how to realise an onClick event on a text Frame?
and thank you for the heads up
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Moved to JavaScript​
Copy link to clipboard
Copied
Ehm, maybe I should move it back?
Copy link to clipboard
Copied
Seems like the right forum now.
Have you studied the Acrobat JavaScript documentation? You will not be able to do this based only on knowledge, no matter how deep, of browser JavaScript. For example, JavaScript belongs to form fields, not text frames, and there is no onClick event...