Skip to main content
Participant
May 4, 2021
Answered

Interactive PDF. When the button is on, it should display a number

  • May 4, 2021
  • 1 reply
  • 667 views

Hello everybody! I am trying to solve a problem. I have to develop an interactive PDF where users can click a button and display a number on another page of the same document. And if users click another button, a different number will appear.
Does anyone know how I can do that?

This topic has been closed for replies.
Correct answer try67

As the Mouse Up event of each of those buttons enter something like this JavaScript code:

 

this.getField("Text1").value = "ABC";

 

Adjust the field name and value you want it to have, of course.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 4, 2021

As the Mouse Up event of each of those buttons enter something like this JavaScript code:

 

this.getField("Text1").value = "ABC";

 

Adjust the field name and value you want it to have, of course.

Participant
May 4, 2021

Thanks TRYG7!
I will add this code to each button. But in the place where I need to show the number, do you know how can I display this number when users click the button above?
What Java code should I use?

 

try67
Community Expert
Community Expert
May 4, 2021

It's "try67" not "tryG7", but never mind...

 

Sorry, I don't quite follow what you mean.