Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

JavaScript to make button invisible button visible again

Avatar

Former Community Member
Hi



I have been trying to create a form in LiveCycle Designer (part of Acrobat Pro ) that keeps a button (call it #1)invisible until another button (call it #2) is clicked, at which click event the invisible button(#1) becomes visible. I've been using JavaScript and either setting the #1's presence as "invisible" in the object editor or scripting it as a formready event presence = "invisible". I've scripted in the click event for #2: #1.presence = "visible". This doesn't work to get #1 to show on #2's click. I've tried a few more similar script with no success.



I'm relatively new to Designer, though have some experience with JS.



Is there another way to script to initially make an object "invisible" and get it to become visible by a runtime event?



I would appreciate any help.



Kind Regards,



Stephen
2 Replies

Avatar

Level 5
Template needs to be saved as Dynamic in order to see those dynamic features working. You have that saved as Dynamic and still have no luck try the following....

#1.presence = "visible";

xfa.layout.relayout();



Note: 1. A button name can not start with "#" hope you are using some meaningful names.

Avatar

Former Community Member
Hi



Thanks for your help. I saved as a dynamic form and used some ideas from your and another posting:



http://www.adobeforums.com/webx/.59b5bff1/0



It worked! Again, thanks.



Kind Regards,



Stephen