0

I have a button and script on a master page that is meant to remove the page when it is clicked.

But as far as I can see the script on the master page can only see the masterpage - it cannot see the page that is 'hosting' it.

Unless I can find the container that it is in, I cant call the instance mamger to remove it... Is this so? If not, how do I access the 'hosting' page?

This code on a button on the master page shows the 'problem', when used on a page and clicked, it shows the path for the master page field, not the page on which the button is hosted.

xfa.host.messageBox(this.somExpression);

Thanks!

pperrin
  • 1,487
  • 15
  • 33

1 Answers1

0

I don't think you can recognize this from the master page. Communication between master- and normal pages always caused problems for me so I would not recommend trying it - there's usually always a less buggy way around it.
But one way is:

  • calling the instance directly

and another way is:

  • putting the delete button inside a main page and let it be copied every time you add an instance.
Cold_Class
  • 3,214
  • 4
  • 39
  • 82