1

I want to ask the user a question and if they click the yes button, then they should be redirected to another page.

Adobe Acrobat allows us to insert JS in the pdf:

if (app.alert("Do you want to go on page X?", 2, 3) === 4) {
    // Make the direct somehow.
}

I don't think we can use the location object there.

Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
  • AcroJS help file says: Go to the first page of the document. this.pageNum = 0; Advance the document to the next page. this.pageNum++; – ReFran Oct 27 '16 at 20:16

1 Answers1

1

Please try

if (app.alert("Do you want to go on page X?", 2, 3) === 4) {
    app.launchURL("http://example.com", true);
}

The true opens in a new browser window, the default is false which will load it in Reader.

Bobrovsky
  • 13,789
  • 19
  • 80
  • 130