Expand my Community achievements bar.

Master Page button hidden prob

Avatar

Former Community Member
How can i make a button in a masterpage invisble??



The code should run from a Script Object.



Hierarchy is ::



testForm

MasterPage

Page1

resetButton

MainPage

Variables

MyScripts



MyScripts is a script object..



And i want to make the resetButton in MasterPage invisible depending on some conditions.
3 Replies

Avatar

Former Community Member
thanks for the reply. But this is not working. coz i need to access the button of the master page from subpage.



i even tried

xfa.form.testForm.Masterpage.page1.resetbutton.presence = "invisible"



and even xfa.resolvenode("xfa....resetButton").presence = "invisible"



but none of them are working..



Any other idea??

Avatar

Former Community Member
The Master page objects are under a PageSet node. So assuming that your button is on a masterpage called Page1 the expression would be:



form1.pageSet.Page1.Button1



To verify you can always put this javascript command on the click of the button to validate how to get to the object:



app.alert(this.somExpression)