I have two buttons on my form. One saves the form and one prints the form. Following those commands are lines of code to mark the form readonly:
Printer Button
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0)
this.resolveNode("header.DateTimeField1").access = "readOnly";
etc...
----------------------------------------------------------------------------------------------------
SaveAs Button
app.execMenuItem("SaveAs");
this.resolveNode("header.DateTimeField1").access = "readOnly";
etc....
My question is, how can I evaluate what button they pressed from the save/print dialog boxes. Currently, if they press the Save button, the save dialog box comes up and if they hit save it saves it and makes the whole form as read only. If they Save and then press cancel, it doesn't save and still marks the whole form as readonly. Same goes for the printer dialog box. Thoughts?