Skip to main content
March 10, 2020
Question

Have different items in a drop down list go to different page views

  • March 10, 2020
  • 2 replies
  • 794 views

hi, 

im wondering if it is possible to have each different item in the drop down list , go to different page views within the document. 

i tried to add the mouse up command to "Go to a page view" but the document doesnt allow me to jump to views based on the specific item selected from the drop down list. using this function the document will just automatically jump to the page view if the user just clicks on the drop down list, but doesnt let them select different items within it. 

 

if there is a script that needs to be inputted please let me know. 

 

thank you. 

    This topic has been closed for replies.

    2 replies

    try67
    Community Expert
    Community Expert
    March 10, 2020

    The basic code to achieve it is the following (use as the field's custom Validation script):

    if (event.value=="Option 1") this.pageNum = 2; // Go to page 3

    else if (event.value=="Option 2") this.pageNum = 5; // Go to page 6

    else if (event.value=="Option 3") this.pageNum = 9; // Go to page 10, etc.

     

    Note the page numbers are zero-based.

    March 10, 2020

    Thank you !

    Thom Parker
    Community Expert
    Community Expert
    March 10, 2020

    Why yes there is.  You'll need a script for this. The technique is amost eactly the same as the technique for setting a field value from a dropdown selection, except the script uses any one of the many navigation techniques. The simples of course is just setting the page number. 

    There are many posts here on setting values from dropdowns,

    Here's an article that covers this issue:

    https://acrobatusers.com/tutorials/change_another_field/

     

    You'll find some information here on PDF navigation:

    https://www.pdfscripting.com/public/DocumentNavigation.cfm 

    Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often