Hi,
I´ve got document checking the reader version during the initialization: if lower than 8.0 I need to shutdown the initialization process and close the document. If process goes on, there will be plenty of error windows (cause of scripting for new versions of the reader), what I want the user to be prevented from(if he has older version).
For closing, I am using this JSsequence:
var myDoc = event.target;
myDoc.closeDoc(true);
which is working fine when on button.click etc., but NOT working in form.initialize ! Is there some way to just shot down the document during the initialization?
I guess event.target is not returning the variable when doc is not initilalized.
Thanks for any suggestion and idea!
Views
Replies
Total Likes
The issue is a handoff issue between XFA plugin and AcroForms. The initialize event fires before the form is ready and hence the objects do not exist until the form is loaded in Acrobat. I woudl suggest trying to use a setTimeout command to execute your close at a time in the future. The setTimeout is an AcroForm command and as such will accept an acroform command to execute in the future. So try this line of code on the DocReady event:
var temp = app.setTimeOut("this.closeDoc(true)", 2000);
In this context the "this" refers to the doc object in Acroform. The 2000 is the number of milliseconds to wait before executing the command.
Hope that helps
Paul
Views
Replies
Total Likes
You could also try firing the button click event in the initialize function.
Views
Replies
Total Likes
oh, great thanks! I´ll test it on the older version later, but shutting down the form correctly.
Views
Replies
Total Likes
AKloft: it is the same for me, while the command will be run during the initialization.
Views
Replies
Total Likes
yes, it´s working fine, but is there some way how to close the Reader instantly? This is working shomehow good, but I´ve got to click through the error msg boxes first...
Views
Replies
Total Likes