The close method can be used to close the modal dialog programmatically. The method accepts an optional parameter which can be anything. That value can then be >accessed in Dynamic Actions that respond to any of the close events of the plug-in. The syntax to access the value is: this.data.modalPageCloseValue. To access the method >from within the child page, see the third example.
$(document).apex_modal_page('close'); $(document).apex_modal_page('close', someVariable); parent.$(parent.document).apex_modal_page('close');
The Manual Close event fires when the the modal dialog is closed by either the end user or programmatically by the close method. If the close method was used it’s possible >that an optional value was passed to the close method which is exposed in Dynamic Actions as this.data.modalPageCloseValue.
The Close event fires whenever the modal dialog is closed, whether automatically or manually.