Expand my Community achievements bar.

Continued issues running JavaScript at server

Avatar

Level 3

I've been having trouble getting JavaScript to run when set to run at "Client and Server". So to try to narrow down the problem, I created a simple new dynamic PDF with a test field on it called "msg". In the docReady event, I placed the following JavaScript code:

this.xfa.form.Ultra_Form.Page1.msg.rawValue = "Test String";

This code works correctly when run at the client, but it does nothing when run at the server (I'm flattening the form through Output).


Any ideas?

- Nathan

3 Replies

Avatar

Former Community Member

The Doc Ready event does not fire on the server ....change the code to the Calculate or Form Ready (I think Form Ready fires on the server _ I do not remember) and it shoudl work.

Paul

Avatar

Level 3

Thanks for the suggestion. That didn't work, unfortunately. I tried those two events, plus several others, and while they all worked on the client, none worked on the server. Events I tried include: initialize, calculate, form:ready, layout:ready and docReady. I made sure they were all set to run at "Client and Server", but none of them fired on the server.

Anything else I can check/try?

- Nathan

Avatar

Former Community Member

Look in the server log to see if there are any errors being reported.

Paul