Expand my Community achievements bar.

Newbie: Some scripts not working...Help!

Avatar

Level 4

Hi all, I'm very new to LiveCycle ES and scripting. I am using version 8.2.1 of LC and am working through the book "Creating Dynamic Forms w/ LC Designer" by J.P. Terry. This question is not specific to the book, though.

I am just getting into FormCalc as well as JavaScripts and am having a tough time. It seems some scripts work fine, but others flat out don't run. For instance, as per pp 140 in the book, the script "username.rawValue = "John Warwick"; works fine.But the next simple script: username.font.typeface = "Courier New"; fails to execute.There's no rhyme or reason to it. Some simple scripts will run, such as border.edge.color.value and font.underline, but other equally scripts fail such as xxx.presence = "hidden".

By fail, I mean...nothing happens, no error message, no change in appearance of any kind. I have poured over the scripting reference for using these simple scripts and have tried them in both FormCalc and Java. I've also created new documents to test, rebooted the computer, you name it!

Is there something simple I'm overlooking here? I feel like I can't move on until I figure out what is going on here. Your help is greatly appreciated!

Graham

4 Replies

Avatar

Level 4

I've attached the test file I've been playing with.

Avatar

Former Community Member

It is queued so we cannot look at it until it clears. I just tried it here and it works fine. Are you sure you are entering the commands on the click event of the button?

Paul

Avatar

Level 10

Hi,

Also try saving your file as a "dynamic XML form", as some changes in appearance will not run in a static PDF.

Good luck,

Niall

Avatar

Level 4

Save as dynamic XML form did the trick! Thanks, I knew it'd be some silly newbie mistake!