Using Template DOM/Dynamic JavaScript



Hey everyone:

I'm attempting to write a script in the "click" event of a button that changes the script in the "enter" event of a text field for the rest of the time the form is open (or permanently will work too). I've been playing with the Template DOM with things like:

xfa.layout.mySubform.myTextField.event__enter.script.value += //the line being added.

I figure there will also have to be some kind of remerge afterwards. Anyone know if I'm on the right track? Anyone done something like this before? Anyone proven that it's impossible?

Any feedback or help would be greatly appreciated!

Ryan D. Lunka

Cardinal Solutions Group






You cannot do that .....Your code is working but the changes to the template DOM are being discarded the next time the form lays itself out. It will go back to the original template thus ignoring your changes. Once the form is rendered you canno get at it. Can you modify the template before rendering (while it is in XDP mode)?