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

javascript problem for form created in Adobe Designer 8.2


Not applicable
I have redesigned the form using Adobe LiveCycle Designer 8.2 and tried to do merging of xml values into the form. But not successful. Below is sample of the javascript

trustedImportXFAData = app.trustedFunction (

function (xmlfilenamename)



var re =".pdf";

var filename = this.path;







This code works find with form created in previous version but not in the new version. I believe it has something to do with the privilege but I do know where I should change.

For you information, I don't get any error from javascript.

Thank you

7 Replies


Level 10
To be able to load a data file into the system programmatically you wil have to certify the PDF. When you certify you have to choose the allow scripting option. Once that is done each user will have to put your certificate that you used to certify into their trusted store.

Just putting the code into a trusted function is not enough.


Not applicable
Hi Paul Guerette,

Thank you for your advice. I'm new to all this. Hope you could direct me to certain documentation where I could learn of how to create cert for PDF and also deploy it to the user. In this case I'm the user. I'm testing this with 2 different laptops.

Please advice. I appreciate your help.

Thank you



Not applicable
I also add in app.alert in the js to see if the code is being executed.

I noticed that the alert before "this.importXFAData(xmlfilenamename)" works fine but the app.alert below does not get executed.

So as you said, this could be due to the cert.

Please help. Thank you



Not applicable
Hi Paul Guerette,

I just remembered. I better inform you this as well so you can see the real picture.

Desktop - OS / Vista Home

I created the PDF form using Acrobat Livecycle ES 8.2, Then I opened the form in Acrobat Professional 9.0 to enable the save features. Then I open in Reader 9 to make I will be able to save data. Successful

Laptop - OS / XP Professional

I have that calls the js passing xml as parameter.

jsCode = "trustedImportXFAData(""" + SOURCE_XML + """);"

Fields = formApp.Fields


In this machine I have Adobe Acrobat 7.0 Professional. The javascript is inside the \Acrobat 7.0\Acrobat\Javascript\.

I wonder could this also be, because of the compatibility between 2 different versions.

Thank you


Level 4
You can see what compatibility issues there will be by setting the default version used in Livecycle Designer by going on the menu to:

File > Form Properties

From this then choose the "defaults" and change the target version to version 7.

Then open the report window by going on the menu to:

Window > Report

Here it will give you a lsit of all the compatibility issues with that version.



Level 10
If you hit Ctrl-J you will get the java console come up and I bet you will see a security error when running your script. This will cause your script to stop executing.


Not applicable
Hi Tom

I did changed as you mentioned but again it could not work.

Hi Paul,

I could not run the debugger by pressing Ctrl-J. I run the application from I do not know where i should do that.

I opened the form using adobe designer 7. After opening and saving again. I test the application. Now the js code works.

But if i create the form using designer 7, I could not save data manually using Acrobat Reader 9.

Please advice. Is there any option for forms created using version 7 to be opened by Reader 9 and be allowed to key data and save them manually?

Thank you