Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Change text of button from an OnClick

jashachik
Level 2
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
jasotastic81
Level 7
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";

jashachik
Level 2
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!