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

Spawned Pages

New Here ,
Nov 30, 2022 Nov 30, 2022

Copy link to clipboard

Copied

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

Views

684

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

correct answers 1 Correct answer

Community Expert , Nov 30, 2022 Nov 30, 2022

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.

Votes

Translate

Translate
Community Expert ,
Nov 30, 2022 Nov 30, 2022

Copy link to clipboard

Copied

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.

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