javascriptpdfadobelivecyclelivecycle-designer

How do I access a page instance from within a script on a master page?


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!


Solution

  • 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:

    and another way is: