The problem is the doc.exportAsFDF and doc.importAnFDF methods won't work with Reader, unless you can reader-enable both documents with LiveCycle Reader Extensions and include the form import/export usage right.
If you provide more information about your intended workflow, there might be alternatives. You mentioned a web server - how will it be involved?
Edit: corrected typo
Well, what I meant by that is when the user exports an FDF, it saves to cPath on the company's server and importAnFDF would use the same cPath (which is a temp folder) to import data, all of this silently.
Basically, I would like to replicate "event.value = this.getField(someField).value" across different documents.
If there was a way to pass variables across documents, it would be enough as the user will, at least once, have both documents opened at the same time.
If you disclose the first document, the second one can read the field value from it using a script. Check out the following documentation for more information:
It's usually best to include the code that discloses the document i na document-level script so it gets executed whenever the document is opened.
This looks extremely interesting. I'll give it a shot.
It worked exactly as expected. Thanks. On the other hand, when executing app.activeDoc(), I get a warning message asking me if I really want to proceed or block the function. I get the exact same warning from openDoc(). How can I permanently stop that warning from poping?
I get a similar one with print().