Skip to main content
Participant
May 4, 2021 2:31 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
May 4, 2021 3:39 PM UTC

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.

4 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 4, 2021 3:39 PM UTC

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.

Translate
Participant
May 4, 2021 5:02 PM UTC

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?

 

Translate
try67
Community Expert
Community Expert
May 4, 2021 5:22 PM UTC

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

 

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

Translate