Creating a custom button with Javascript
Hi everyone,
I'm trying to automate a custom button dedicated to page navigation, it would:
1. Set up a "mouse up" action to go to a destination at the bottom of my PDF.
2. Create a second button at the desired page in the PDF, it should reference where the original button is.
Right now I've created a "destinations" tool to move to a specific page. However, I would like to set the destination to the newly created button and visa-versa.
My employer struggles with technology and I believe creating simple buttons like this will help with the form creation and navigation.
Here's some of my code:
("Buttons" is my array of buttons)
for(var j = 0; j < buttons.length; j++){
if(buttons[j].name.substring(0, 7) == "FINDING"){
buttons[j].fillColor = color.blue;
buttons[j].textColor = color.white;
buttons[j].textSize = 10;
buttons[j].textFont = font.Helv;
if(buttons[j].pageNum == 2){***This has not worked either***
buttons[j].setAction("MouseUp", this.gotoNamedDest("Ref"));
}
}
}
Thanks for the help in advance. I hope this was clear enough and I would like to know if what I want is actually possible. I've realized Adobe is not the easiest to work with. I'm a web developer and Adobe's limitations are becoming increasingly frustrating.
