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
BedrockMission!

Learn More

View all

Sign in to view all badges

Using Template DOM/Dynamic JavaScript

Avatar

Avatar
Validate 1
Level 4
Ryan_Lunka
Level 4

Likes

11 likes

Total Posts

143 posts

Correct Reply

11 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
Ryan_Lunka
Level 4

Likes

11 likes

Total Posts

143 posts

Correct Reply

11 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Ryan_Lunka
Level 4

11-02-2009

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

rlunka@cardinalsolutions.com

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-02-2009

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)?