Opens the specified page ( pUrl ) in a dialog. The modal
option determines if the page is
a modal page or a non-modal page.
A modal page is loaded in an iframe using jQuery UI dialog widget. It is an overlay window positioned within the same browser window. When a modal dialog is active, the user is unable to interact with the rest of the page, until the dialog is closed.
A non-modal page is loaded in a new window using the apex.navigation.popup function. A user can interact with a non-modal dialog and content on the page.
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:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pUrl |
string | The URL of the page to load as a dialog. | ||||||||||||||||||||||||||||
pOptions |
Object | Identifies the attributes of the dialog, such as height, width, maxWidth, title, modal.
Properties
|
||||||||||||||||||||||||||||
pCssClasses |
string | Identifies the CSS classes, if any, to be applied to the dialog, and appended on to the dialogClass attribute. | ||||||||||||||||||||||||||||
pTriggeringElement |
string | jQuery selector to identify the APEX page element opening the dialog.
The apexafterclosedialog or apexafterclosecanceldialog event is triggered on this page element. |
Example
apex.navigation.dialog(
url,
{
title:'Orders',
height:'480',
width:'800',
modal:true,
resizable:true
},
'a-Dialog--uiDialog',
$('#mybutton_static_id') );
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 apps.
Every effort is made to focus the window. The intention is that the window will be a popup window and not a tab. The default window features are such that most browsers should open a new window.
Note: To avoid being suppressed by a popup blocker, call this from a click event handler on a link or a button.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pOptions |
Object | An object with the following optional properties:
Properties
|
Returns:
- Type
- Object | null
Examples
var myPopupWindow = apex.navigation.popup (
{
url: "about:blank",
name: "_blank",
width: 400,
height: 400
}
);
var myTriggeringElement,
myPopupWindow;
myTriggeringElement = apex.jQuery( '#myButton' );
myPopupWindow = apex.navigation.popup ( {
url: "f?p=102:2:&APP_SESSION.:::2::",
name: "Information",
scroll: "no",
resizable: "no",
toolbar: "yes"
} );
navigation.dialog.registerCloseHandler( {
handler$: myTriggeringElement,
dialog: myPopupWindow,
triggeringElement$: myTriggeringElement,
closeFunction: function() {
myPopupWindow.close();
}
});
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 new window.
Unlike a popup, the new window is intended to be fully functional. This is intended to be as close
as you can get to a normal anchor with a target (<a target="name" href="...">
)
behavior from JavaScript but with the feature of focusing the window in all browsers by default.
If option favorTabbedBrowsing
is true:
For IE, Edge, and Firefox, the user may need to manually focus the
tab (assuming the browser is configured to open pages in tabs).
If option favorTabbedBrowsing
is not true (the default):
For IE and Firefox, the page will be opened in a new browser window
(unless explicitly overridden by a browser setting). But it will very likely be able to focus
the new page.
Once the named window is open the favorTabbedBrowsing
setting doesn't apply to that window.
Note: Firefox, Edge, and IE will not focus a tab if that tab isn't the currently active tab in its browser window.
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:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pURL |
string | The URL of the page to load. | |||||||||||||||||
pWindowName |
string |
<optional> |
The name of the window. The default is "_blank". | ||||||||||||||||
pOptions |
Object |
<optional> |
Options object with these properties:
Properties
|
Returns:
noopener
is true then the return value is always null.
- Type
- Object | null
Example
var myWindow = apex.navigation.openInNewWindow( url, "MyWindow" );
Opens the specified page (pWhere) in the current window.
Parameters:
Name | Type | Description |
---|---|---|
pWhere |
string | The URL of the page to open. |
pIgnoreUnsavedChanges |
boolean | Whether to ignore the checks for unsaved changes. The default is false. |
Examples
apex.navigation.redirect ( "f?p=&APP_ID.:3:&APP_SESSION.::NO:RP::" );
apex.navigation.redirect ( "f?p=102:1:&APP_SESSION.:::::" );
apex.navigation.redirect( "f?p=" + apex.env.APP_ID + ":3:" + apex.env.APP_SESSION );
apex.navigation.redirect( apex.item("P1_URL").getValue() );