Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Events not working

Avatar

Former Community Member
Hello everyone.



I'm completely new to Adobe so forgive the ignorance. I do have a fair bit of coding experience though.



My problem is this:



I'm just trying to get started with Designer. I have a button who's caption I'm trying to change when clicked.



The line of Code is this:

Button1.caption.value.#text.value = "test"



or, in JS:

this.resolveNode("caption.value.#text").value = "test"



When I stick this bit of code in the 'initialize' Event, it works.



However when I try the code in another event (mouseDown, change, click) it has no effect whatsoever.



What am I doing wrong here????



I know there's something ridiculous I'm overlooking.



Thanks everyone!
2 Replies

Avatar

Former Community Member
Make sure you save your PDF as a dynamic PDF. If you save it as static it will not be able to change the caption at runtime, only before the PDF has been rendered (ie: in an initialize event).



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Hi all,



I have faced similar situation like Steve did.

In my case I tried to change caption of a Textfield when another Drop-down List is changed. JS is written in "exit" event of the Drop-down List.

I saved this file as a "xdp" file. Which is "xdp" file a dynamic PDF or a static PDF? In xdp file, is it not possible to change the caption at runtime?



Thanks,

Akira