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

Text frame with onClick Event (interactive PDF)

New Here ,
Nov 20, 2018 Nov 20, 2018

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

TOPICS
Acrobat SDK and JavaScript

Views

608

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
community guidelines
LEGEND ,
Nov 20, 2018 Nov 20, 2018

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.

Votes

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
community guidelines
New Here ,
Nov 20, 2018 Nov 20, 2018

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

Votes

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
community guidelines
LEGEND ,
Nov 21, 2018 Nov 21, 2018

Copy link to clipboard

Copied

LATEST

Votes

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
community guidelines
Guru ,
Nov 20, 2018 Nov 20, 2018

Copy link to clipboard

Copied

Moved to JavaScript​

Votes

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
community guidelines
Guru ,
Nov 20, 2018 Nov 20, 2018

Copy link to clipboard

Copied

Ehm, maybe I should move it back?

Votes

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
community guidelines
LEGEND ,
Nov 20, 2018 Nov 20, 2018

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...

Votes

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
community guidelines