Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!
SOLVED

Enter Script Source Changes button missing???

Avatar

Former Community Member

Hi Guys,

Forgive me if I'm being completely stupid but I'm trying to work with some of the exclusion group examples given on the blog by John Brinkman at http://blogs.adobe.com/formfeed/2008/10/exclusion_groups_v30.html I want to make some simple changes to the Javascript, but when I make my changes I find that I don't have the 'Enter Script Source Changes' button which I have found described in several other places.  When I look at the Prieview PDF tab, the portion of the form I just edited doesn't work!

I don't see what I'm doing wrong.  I'm using an up to date version of Livecycle Designer ES 8.2.

Can anybody help?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Paul,

Yes, I see the same thing here. It had me flummoxed!!!

So I went to John's Blog and there are updated exclusion groups samples, which do not exhibit this problem.

http://blogs.adobe.com/formfeed/Samples/exclgroup4.pdf

http://blogs.adobe.com/formfeed/2008/12/adventures_with_javascript_obj.html

http://blogs.adobe.com/formfeed/2008/12/exclusion_groups_v40.html

I think that if you download the latest (and greatest) you should be up and running.

Good luck,

Niall

View solution in original post

7 Replies

Avatar

Level 10

Hi,

From memory, in earlier versions of LC Designer there was a button above the script editor, which would commit the changes in the script. It isn't there in v8.2.

In any case I don't think that is your problem. It may be that in changing the script you have upset the flow. Go into the script and click the check script syntax button (shown above). Errors are shown in red. Some additional guidance may be given in the warnings tab.

Then when previewing the form in Acrobat press Control+J to bring up the javascript console. This will report errors and may help you to trace the problem.

Good luck,

Niall

Avatar

Former Community Member

Thanks for the answer Niall.  It certainly clears up the missing button issue.

I'm sure you're right about upsetting the Javascript somehow too.  A note on this though... when I undo my changes and restore the Javascript to how it was originally, it still doesn't work!  What could be happening?

Essentially I have an exclusion group that I copied as a fragment from the second subform on the sample here - http://blogs.adobe.com/formfeed/samples/exclusionSubform3.pdf  I used this sample so I could build an exclusion group of check boxes that behaved like a group of radio buttons with a text field that was essentially another radio button option when the respondee decided to use the 'other' option on my form.

I have tried your suggestions.  The check syntax doesn't bring up anything, and the warnings tab is completely empty when I preview the PDF.  I have pressed ctrl+J and brought up the Javascript debugger but I have no clue how to use it?!?  Can you give me a pointer to get me started?

Thanks

Paul

Avatar

Level 10

Hi Paul,

When you open the console there may be some returns already in it.

Acrobat EScript Built-in Functions Version 9.0
Acrobat Annotations / Collaboration Built-in Functions Version 9.0
Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0
Acrobat SOAP 9.0

You can clear these by clicking the trash button at the bottom.

What you are looking out for are errors either when the form loads or when you click into the exclusion group.See below

This tells you the object which has fallen over; the event; the problem; and the line number (thanks Paul G).

Open your form and the console. Try and click into and out of the exclusion group and see if it thows up anything.

Without seeing your form, it is difficult to be specific. Please forgive me if I am stating the obvious, but these would be some suggestions:

  • There isn't any script in the checkboxes or textfield;
  • The main script is in a script object called "utility". John has this in the variables in the Master Page. You will need this in your form, but also placed in the same relative hierarcy in your form;
  • This has six (I think) functions. You may need all of these.
  • The exclusion group script is contained in the subform initialise event and calculate event. The initialise events calls the setMinAndMax() function. The calculate event calls the makeExclusive() function. While it looks like these are the only two functions called. It is likely that some of the remaining four functions in the utility script object are called from within the functions;

So, you should make sure that your checkboxes/textfield are within a subform. That subform should have the same script as John's in the initialise and calculate events. Lastly your form should have an exact copy of the utility script object.

Hope that helps,

Niall

Avatar

Former Community Member

Hi Niall,

I'm pretty sure that I have done everything on my form as you have described.  As I mentioned before, it's wierd because as long as you don't change the code at all, the script works fine (as in Johns example) but when it has been changed, the checkboxes are just inactive.  Try it using Johns example, change the max vaule to 2 in the setminandmax function in the second subform and switch to the PDF preview tab.  That part of the form suddenly stops working even though you have only changed one character in the code.  The second wierd thing is that if you then change the code back to how it was (with the intention of restoring the functionality), it still doesn't work!!

Please tell me you get the same!!

Paul

Avatar

Correct answer by
Level 10

Hi Paul,

Yes, I see the same thing here. It had me flummoxed!!!

So I went to John's Blog and there are updated exclusion groups samples, which do not exhibit this problem.

http://blogs.adobe.com/formfeed/Samples/exclgroup4.pdf

http://blogs.adobe.com/formfeed/2008/12/adventures_with_javascript_obj.html

http://blogs.adobe.com/formfeed/2008/12/exclusion_groups_v40.html

I think that if you download the latest (and greatest) you should be up and running.

Good luck,

Niall

Avatar

Former Community Member

Niall,

Thanks so much for your help.  I had looked at that example but I hadn't noticed that John seems to have completely re-worked how his code is implemented.

Hopefully it should just be a bit of re-work with the new scripting objects and I'll be cooking on gas!

Thanks again

Paul

Avatar

Level 10

Actually you'll find the latest version of John's script objects in this blog post:

http://blogs.adobe.com/formfeed/2009/03/a_form_to_design_a_form.html

(unless something newer has come along I've missed)

He's working on a way to keep track of what the current versions are.