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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Could you point me to the documentation?

Avatar

Level 3

I'm trying to find good documentation about how to build a custom function with Javascript in my LS-created form.

Would someone please point me in the right direction?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Then what you are looking for is called a scripting object. It is well described in the online help in Designer.

Paul

View solution in original post

0 Replies

Avatar

Level 3

Hi there!

You can try this link: http://help.adobe.com/en_US/livecycle/9.0/lc_dp_list.html and under the "Creating Forms Using LiveCycle Designer ES2" heading, you can find a variety of documentation resources that include a basics guide and reference material.

Hope that helps!

...Gil

Avatar

Level 3

Thanks Gil,

I'm looking for a description of how to create a custom function within LS then

call it from various events.

The pointer you sent has lots of info but I don't seem to be able to find what

I'm seeking.

I'm not sure what I want to do can even be done within LS, do you know?

Thanks again

 Bill

Avatar

Level 3

Sorry, what is LS? Do you mean LC, for LiveCycle?

If you click on LiveCyc'e Designer ES2 Scripting Basics, there is a section on Events. That section may have some of events information you seek. There is a entire Application model available that let's you key in on different types of events that include Application events and form interaction events.  What are you trying to accomplish?

Avatar

Level 3

Sorry, meant LC.

I have to exec some complex code at both prePrint and preSave events (maybe also others) and am looking for a way to only write it once then execute it when I need it. A custom (global?) function may be one answer but I don't know how to create it.

Is there some other way?

Thanks

Avatar

Correct answer by
Level 10

Then what you are looking for is called a scripting object. It is well described in the online help in Designer.

Paul

Avatar

Level 3

As Paul mentions (Thanks Paul!), it is well described in the Designer Help.

Here's a direct link to the Scripting section in the Designer Help: http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000715.html#1613857.

Other subtopics that may help you with what you seek based on what I think you said you were trying to accomplish:

  • Referencing Objects in Calculations and Scripts (http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000794.html#1592676)
  • To create a script object (http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000819.html)
  • To reference JavaScript functions stored in a script object. ( http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000820.html)

Feel free to look at other topics in the Scripting section. It is fairly comprehensive. If not, providing a snippet of code might help as well.

I presume you are familiar with working with the Scripting environment in Designer ES2. If not, there is a small calculation tutorial that shows you how to use the Script Editor (http://www.adobe.com/go/learn_lc_subtotals_9).


Hope that helps!

...Gil

Avatar

Level 3

Thanks to you both, it looks like the info I need. No doubt there will be other

questions in the future...

 Bill

Avatar

Level 3

You want to put your JS functions in a Scripting Object.  If you don't see one at the bottom of the hierarchy list, right click the root and add it.  Then put the code in this one place and call it from one to many places on your form.

Avatar

Level 3

Thanks to all of you for the great assistance!