Hello,
I'm using Adobe LiveCycle Designer v 8.2 to develop an Order form. I'm fairly new to developing in LiveCycle, and would like to ask the following question that I couldn't find an answer to elsewhere.
I'd like to know if it is possible to close a form down within a script, if certain conditions are met/not met. Specifically, when my form loads I am testing the user's version of Acrobate Reader. If it is not above the stated version, I would like the form to close down. At the moment, it displays the warning message correctly but then continues to try and load the form.
I guess the JavaScript equivalent of Me.Close() is what I am after
if
(xfa.host.version < 8.101)
{
xfa.host.messageBox("Your version of Adobe Acrobat Reader is not recent enough to use this form.",
"Wrong version of Adobe Acrobat", 1);
//Code to close form to go here
}
Can anyone help?
Thanks
Matt
Solved! Go to Solution.
Views
Replies
Total Likes
I tried it in 8 and 9 and it worked fine ....there may have been a bug on that version but I do not have it to test with.
Paul
Views
Replies
Total Likes
You will be able to close the form but you will not be able to close the Reader application. The command you want is event.target.closeDoc(). This will close the currently active Document. Note that if you are diosplaying in a browser then it will not close the doc ....it will only work form the Reader/Acrobat applications.
Paul
Hi Paul,
Thanks very much for the response. I've added the code and it does close the form when needed, the problem is that it also crashes Acrobat Reader (version 7.0). Is there any other code that I should add around the event.target.closeDoc() statement to ensure a 'clean' closure of the form?
Thanks
Matt
Views
Replies
Total Likes
I tried it in 8 and 9 and it worked fine ....there may have been a bug on that version but I do not have it to test with.
Paul
Views
Replies
Total Likes