Copy link to clipboard
Copied
I'm using Acrobat Pro DC. I want to use a drop down menu to link internally in my PDF document. I think its possible and the solution is probably with JavaScript. I am very new to JS. I have the drop down created via forms, but nothing I add into the preferences in JS is doing the trick. Any help would be greatly appreciated.
Thank you
OK. So first tick the box that says "Commit the selected value immediately" under the drop-down's Properties, Options tab, and then enter this code as its custom validation script:
if (event.value=="A") this.pageNum = 1; // Go to page 2
if (event.value=="B") this.pageNum = 4; // Go to page 5, etc.
Adjust the values and page numbers, as required.
Copy link to clipboard
Copied
Do you mean something like "if item A is selected, go to page 2; if item B is selected go to page 5; etc."?
Copy link to clipboard
Copied
Yes exactly
Copy link to clipboard
Copied
OK. So first tick the box that says "Commit the selected value immediately" under the drop-down's Properties, Options tab, and then enter this code as its custom validation script:
if (event.value=="A") this.pageNum = 1; // Go to page 2
if (event.value=="B") this.pageNum = 4; // Go to page 5, etc.
Adjust the values and page numbers, as required.
Copy link to clipboard
Copied
SWEET!
THANK YOU!
I got it to work.
now is there anyway to set the linking to a destination instead of a page number? I'm thinking in terms of flexibility as the destination stays with the page no matter where is gets moved to?
Copy link to clipboard
Copied
and I just found the answer. this is after setting destinations in the book mark area thinger...
if (event.value=="PageB")this.gotoNamedDest("PageC");//go to page 2
try67, thanks ever so much for the help its greatly appreciated!!
Copy link to clipboard
Copied
You got it right! It's just important to realize that Destinations and Bookmarks are not the same thing. Bookmarks can point to destinations, though.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now