Expand my Community achievements bar.

Change text of button from an OnClick

Avatar

Level 2

Good afternoon,

I have three buttons in a row setup and when you click the furthest right the text of all three should change, and if you click the furthest left all three should change. I am unsure of how to change the text of a button programmatically. Any help would be very appreciated. Thank you,

james

2 Replies

Avatar

Level 7

Place this in the click event for the left button (btnLeft), and something similar in the click event for the right button (btnRight).

xfa.resolveNode("btnLeft.caption.value.#text").value = "Left";

xfa.resolveNode("btnCenter.caption.value.#text").value = "Left";

xfa.resolveNode("btnRight.caption.value.#text").value = "Left";

Avatar

Level 2

Thanks jasotastic!

That worked perfect!

Can you show me how to make this work for the HTML side as well?

And as a follow up, I have these buttons setup in my Master Page, when I make this change of text on the buttons it is only on the first page not the following ones. Is there some option I have to select to make the text changes across all screens?

Thank you very much for the help!