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

Spawned Pages

New Here ,
Nov 30, 2022 Nov 30, 2022

I need to add a delete page button to a spawned page so if someone creates too many pages they delete the pages they don't want. These are all created at the end of the document. 

I am quite new to this Java script.

 

Many thanks

TOPICS
Edit and convert PDFs , How to , JavaScript
972
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 30, 2022 Nov 30, 2022
LATEST

If you want the button to delete the page its on use the following code as its Mouse Up event:

this.deletePages(event.target.page, event.target.page);

In order for it to work the field name of the button must be unique, though.

View solution in original post

Translate
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
Community Expert ,
Nov 30, 2022 Nov 30, 2022
LATEST

If you want the button to delete the page its on use the following code as its Mouse Up event:

this.deletePages(event.target.page, event.target.page);

In order for it to work the field name of the button must be unique, though.

Translate
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