These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How do you call control event code from LiveCycle JavaScript?

thfeldman67
Registered: Apr 25 2008
Posts: 23
Answered

If you have a JavaScript function (or functions) that you want to reuse, I know you can create a Scripting Object and put it in there.

However, if you want to create a custom object library group - I can only see a way to create custom controls - not Scripting Objects - that can be dragged onto a PDF. So it would be helpful know either:

A) How do you put a Scripting Object into a custom library group (either by itself or with other controls) so that it can be dragged into a PDF?

or

B) How do you call JavaScript code included in an event for one control from an event in another control?

Please let me know if you know how to do either. Thanks in advance for your help!

Trevor Feldman
BD

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You do not call an event action, but you should be calling a document level function or a function created in the document ready event.

George Kaiser

thfeldman67
Registered: Apr 25 2008
Posts: 23
How would you call a document-level function - or a function created in the document ready event? (what would the syntax be for the object hierarchy?)

Also, if I could use a either a document-level function or document ready function, is there a way to "drag and drop" this code from a library when creating a new PDF (without resorting to "cut and paste")?
thfeldman67
Registered: Apr 25 2008
Posts: 23
FYI, someone on Google groups found the answer to B):

.execevent("eventname")ex: Button1.execEvent("click")