Expand my Community achievements bar.

Javascript Not Executing on Form Server for a Dynamic XDP File

Avatar

Former Community Member
I created several xdp designs using Lifecycle 7.1. Included in these xdp's are some subforms and elements with some Javascript embedded in the docReady event. Everything runs like a gem in the Lifecycle preview, but when the xdp is deployed to the server, none of the scripts run. I confirmed that by replacing my code with simple messageBox alerts, and these did not even show when run on the server.



Here is an example of some of the scripts that I am running:

/*****Begin:******/

//If Name is not present

if(loanRequest.RepaymentsPage.Header.LeftGroup.participantName.dataNode.isNull)

{

loanRequest.RepaymentsPage.Header.LeftGroup.participantName.presence = "hidden";

}



//If Loan Number is not present

if(loanRequest.RepaymentsPage.Header.LeftGroup.loanNumber.formattedValue == "-1")

{

loanRequest.RepaymentsPage.Header.LeftGroup.loanNumber.presence = "hidden";

}

/*****End:********/



I did quite a bit of reading in this forum and made sure I selected the File>Form Properties>Defaults>Server>"Override Default Rendering" checkbox as well as setting the "PDF Render Format" to "Acrobat 7.0.5 Dynamic PDF". I have still had no success in getting the scripts to run on our Adobe Form Server. I double checked and I and the people doing the testing are both using Acrobat Reader 8.0.



Is this a problem with my settings for the XDP's that I have created, or is it a problem with the configurations of our server? Please let me know what you think.



Thanks!



Ben
2 Replies

Avatar

Level 2

This message is very old. I'm still facing the same problem. Any reply?

Avatar

Employee

This age old message never contained the information needed to help this guy. There are many reasons why it did not work on the server, starting with where the script is allowed to run (Client, Server, Client+Server) or which events, as not all of them can execute on the server. Click, Enter, Exit, Change etc only work with interactive forms inside Adobe Reader/Acrobat. Also, how did he save the form/render the form. If you create a static print PDF then event execution is different to what it is interactively. Finally, xfa.host.messageBox DOES NOT WORK ON THE SERVER That is not a valid proof that the script does not work.

 

No problem for two people is exactly the same - so you should provide more details about your form here to get help.