Hello,
QUESTIONS:
A) Is it possible to embed javascript in XDP data documents?
B) If so, can you please provide an simple example of an XDP data document with an embeded javascript?
SCENERIO:
I would like to add a alert, ok/err, after the form has been submitted to a server side script for processing, and the xdp data document is returned from the server http response back to the browser with an embeded javascript. I would like to embed the alert javascript directly into the XDP data returned by the server. Sort of like the Status on an Acrobat Form.
I just need a simple example please.
Any help is very much appreciated!
Thank you.
Regards,
Nick
1. You can return FDF with a JS message in it. This used to be a great strategy. But unfortunately new security in Acrobat 9 can block FDF files from loading. There is a trust mechanism that has to be engaged to make this work.
2. Another strategy is to place a hidden field on the form that is only filled in by the returned XDP. Use a validation script to parse the returned info and then display a message to the user. Then delete the returned data from the field.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script