Button to take user to random page

Jun 07, 2020

Copy link to clipboard

Copied

I am trying to create a set of flashcards to take a user to a random question and then another button to take the user to the answer. I have a PDF document with alternating questions and answers, about 400 pages in total. Any help would be appreciated.

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms, Rich media and 3D

Views

200

Likes

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

Button to take user to random page

Jun 07, 2020

Copy link to clipboard

Copied

I am trying to create a set of flashcards to take a user to a random question and then another button to take the user to the answer. I have a PDF document with alternating questions and answers, about 400 pages in total. Any help would be appreciated.

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms, Rich media and 3D

Views

201

Likes

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
Jun 07, 2020 0
Jun 07, 2020

Copy link to clipboard

Copied

Use this code in a MouseUp "run a JavaScript" action

 

this.pageNum = Math.round(Math.random()*this.numPages);

Likes

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
Reply
Loading...
Jun 07, 2020 0