• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to jump to a spawned page, and how to delete an unneeded spawned page?

New Here ,
Jun 16, 2018 Jun 16, 2018

Copy link to clipboard

Copied

I was able to spawn in a new page successfully, and on my end, when I click the "Add Page" button I created, it jumps to that page. However, for others, it is not doing that, it simply remains on the initial page. Is there a script I can add to the button that spawns the page, that will make it also go to that newly spawned page?

Additionally, I'd like to be able to allow clients to Delete an unneeded page. The form originally is one page. They can then click to Add a Page. My client would like to be able to delete a page in case the Add a Page button is clicked accidentally, or someone changed their mind.

I've searched Google to no avail, as many of the links that look like they are the answer I need, is from acrobatusers.com which seems to no longer be active

I should mention I am VERY new to all of this.

Thanks in advance!

TOPICS
Acrobat SDK and JavaScript

Views

330

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
community guidelines
Engaged ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

LATEST

In the mouse up event of button:

var cResponse = app.alert("You are about to delete this page.\n\n\tDo you wish to proceed?",2,2)

if (cResponse == 4) this.deletePages(this.pageNum)

Be aware that deleting a page that is not the last one will disrupt the logical naming of your fields and might affect other scripts.  If you need to avoid this, just add an if statement that ensures you are deleting the last page of the doc

Votes

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
community guidelines