The apex.navigation namespace contains popup and redirect related functions of Oracle Application Express.
Parent topic: JavaScript APIs
Opens the specified page in a dialog. For mobile UI, the page is loaded using a role 'dialog' in a mobile.changePage call. For desktop UI, a modal page is loaded in an iframe using jQuery UI dialog widget. For desktop UI, a non-modal page is loaded in a popup browser window. The names _self, _parent, and _top should not be used. The window name is made unique so that it cannot be shared with other apps. Every effort is made to then focus the window.
Note:
Typically this API call is generated by the server when the page target is a modal page or by using APEX_UTIL.PREPARE_URL. At a minimum the url of the dialog page must be generated on the server so that the correct dialog checksum can be generated.
Parameters
Table 37-36 apex.navigation.dialog
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 String  | 
 The url of the page to load.  | 
| 
 
  | 
 Object  | 
 Object to identify the attributes of the dialog, with the following properties: 
 For example, to define jQuery UI Dialog attribute resizable: resizable:false
See Also : See jQuery UI documentation of Dialog widget for all other available options for a modal dialog in a desktop user interface.  See jQuery Mobile documentation of Dialog widget for all other available options for a modal dialog in a mobile user interface.   | 
| 
 
  | 
 String  | 
 To identify the CSS classes, if any, to be applied to the dialog, and appended on to the dialogClass attribute.  | 
| 
 
  | 
 String  | 
 jQuery selector to identify APEX page element opening the dialog.  | 
Example
apex.navigation.dialog(url, {
    title:'About',
    height:'480',
    width:'800',
    maxWidth:'1200',
    modal:true,
    resizable:false },
    'a-Dialog--uiDialog',
    '#myregion_static_id');
Parent topic: apex.navigation namespace
Closes the dialog window.
Parameters
Table 37-37 apex.navigation.dialog.cancel
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 Boolean  | 
 To identify whether the dialog is modal.  | 
Parent topic: apex.navigation namespace
Executes an action and then closes the dialog window.
Parameters
Table 37-38 apex.navigation.dialog.close
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 Boolean  | 
 To identify whether the dialog is modal.  | 
| 
 
  | 
 String, Function, Object  | 
 This can be: 
  | 
Example
To handle chaining from one modal dialog page to another:
apex.navigation.dialog.close(true, function( pDialog ) {
    apex.navigation.dialog(url, {
        title:'About',
        height:'480',
        width:'800',
        maxWidth:'1200',
        modal:true,
        dialog:pDialog,
        resizable:false },
        'a-Dialog--uiDialog',
        '#myregion_static_id');
 
});
Parent topic: apex.navigation namespace
Fires the internal close event of a dialog which was registered with the registerCloseHandler when the dialog was opened.
Parameters
Table 37-39 apex.navigation.dialog.fireCloseHandler
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 Object  | 
 pOptions has to contain the following attributes: 
  | 
Parent topic: apex.navigation namespace
Registers the internal "close" event of a dialog. The event will be triggered by fireCloseEvent and depending on the passed in pAction, it will:
Re-use the existing dialog and navigate to a different dialog page
Navigate to a different page in the caller
Cancel the dialog
Close the dialog and trigger the "apexafterclosedialog" event
Parameters
Table 37-40 apex.navigation.dialog.registerCloseHandler
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 Object  | 
 
 
  | 
Parent topic: apex.navigation namespace
Opens the given url in a new named window or tab (the browser / browser user preference settings may control if a window or tab is used). If a window with that name already exists it is reused. The names _self, _parent and _top should not be used. The window name is made unique so that it cannot be shared with other apps. Every effort is made to then focus the window.
Note:
Firefox and IE will not focus a tab if that tab is not the currently active tab in its browser window. This is why, unless favorTabbedBrowsing is true, this API forces the url to open in a new window so that it has a better chance of being focused.
Note:
For Opera, the Advanced/content > JavaScript Options: “Allow raising of windows" must be checked in order for focus to work.
Note:
To avoid being suppressed by a popup blocker, call this from a click event handler on a link or button.
Parameters
Table 37-41 apex.navigation.openInNewWindow
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 String  | 
 The url of the page to load.  | 
| 
 
  | 
 String  | 
 The name of the window (optional) The default is   | 
| 
 
  | 
 Object  | 
 Optional object with the following properties: 
  | 
Returns
Returns the window object of the named window or null if for some reason the window isn't opened.
Example
apex.navigation.openInNewWindow(url, "MyWindow");
Parent topic: apex.navigation namespace
Opens the given url in a new typically named popup window. If a window with that name already exists it is reused. If no name is given or the name is "_blank" then a new unnamed popup window is opened. The names _self, _parent and _top should not be used. The window name is made unique so that it cannot be shared with other applications.
Note:
To avoid being suppressed by a popup blocker, call this from a click event handler on a link or button.
Parameters
Table 37-42 apex.navigation.popup
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 Object  | 
 An object with the following optional properties: 
  | 
Example
apex.navigation.popup ({
    url: "about:blank",
     name: "_blank",
     width: 400,
     height: 400,
     scroll: "no",
     resizable: "no",
     toolbar: "yes" });
Parent topic: apex.navigation namespace
Sets the value of the item (pItem) in the parent window, with (pValue) and then closes the popup window.
Parameters
Table 37-43 apex.navigation.popup.close
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 DOM node | string ID  | 
 The item to set.  | 
| 
 
  | 
 string  | 
 The item value to set.  | 
Parent topic: apex.navigation namespace
Opens the specified page (pWhere) in the current window.
Parameters
Table 37-44 apex.navigation.redirect
| Name | Type | Description | 
|---|---|---|
| 
 
  | 
 String  | 
 The url of the page to open in the current window.  | 
Parent topic: apex.navigation namespace