Hi,
You could use the code
event.target.closeDoc();
If the form is in Acrobat, the user will be asked if they wish to save it.
If the form is in Reader and the form has been reader extended to allow the Save right, they will also be asked if they wish to save
Otherwise the form will just close.
Hope this helps
Malcolm