How can I execute multiple click events (about 25 buttons) via another button?



My doc has multiple sections, which can be expanded or collpased, by pressing a particular section's button.

I want to create one button that will expand all sections, and one that will collapse all sections.

I guess I'm asking: How can I program one button to simulate (execute) a click on all of the other buttons?

so, on the click of button1,

button 2 is clicked

button 3 is clicked..

and so on...

I'm super new to livecyle and up until now, have faired pretty well, but this most definitely is a road block for me.

I'm hoping someone out here can send me a useful code that I can plug into the xml page fot this form.

Please help!

Thank you!! 😃

Accepted Solutions (0)

Answers (2)

Answers (2)




I'm not quite sure if this will help, simply because I believe I am a bit more of a novice than I imagined (especially with javascript). In my simple lamens terms this is what I have learned in regards to what I need to do, or what I think I can do:

Definite: I know I need to call the functions of multiple buttons(VG1, ATB1,Term1, Prot1, etc.)  when I click "Button2". (triggering the actions of these buttons, expands/collapses the document sections and subsections.. in a read more/less sort of way)

I created a script object "AllButtons" and wanted to create a script for the script object that would do what I needed it to do. (Is this possible?)

My thought was: when button 2 is clicked, AllButtons is executed, which, in turn "clicks" all of the other buttons(VG1, ATB1,Term1, Prot1, etc.)

You are correct, everything is on one subform.  I've techinically combined about 6 different forms into one, and depending on the user selection of two dropdownfields, certain sections will unhide/activate.)

I'm hoping to add this 'master' button (button2) to make the doc more printer/user friendly. As it currently stands the user would have to click almost 30 buttons before printing so that data will be revealed.  I want to allow the user to expand all relevant sections or all relevant sections and sub sections before printing.

Thanks so much Magus




Hi there,

if you have a subform with multiple instances and the buttons you want to call are in this subform, you can iterate through each of the subform within a loop and call the event wanted for each buttons..

to call the an event from another object within your PDF, you can call the function execEvent(), by specifying the event you want to call...

I hope this will help you getting started!