The GlideNavigation API provides methods to control and refresh the navigator and main frame.

These methods are accessed using the g_navigation global object.

GlideNavigation - open(String url, String target)

Redirects to a new URL.

Table 1. Parameters
Name Type Description
url String The URL to load. It can be any URL supported by the browser.
target String Optional. The frame in which to load the content specified by the URL.

Default: Current frame

Table 2. Returns
Type Description
void

Example

This example shows how to open the list of active incidents within an instance and display the content in the current frame.

g_navigation.open('incident_list.do?sysparm_query=active=true');

GlideNavigation - openPopup(String url, String name, String features, Boolean noStack)

Opens the specified URL in a popup window.

The features parameter is part of the DOM specification and is passed through. For more information on the available feature list, refer to the Mozilla Developer Network.

Table 4. Returns
Type Description
Window Instance of the new window.

Example

This example shows how to open the list of active incidents within a popup window called "Active Incidents", and enable the resizable, scrollbars, and status features on the window.

g_navigation.openPopup('incident_list.do?sysparm_query=active=true', 'Active Incidents', 'resizable,scrollbars,status', true);

GlideNavigation - openRecord(String tableName, String sys_id)

Redirects to a record. The record displays in the navigator frame.

Table 5. Parameters
Name Type Description
tableName String Name of the table containing the record to display.
sys_id String Sys_id of the record to display.
Table 6. Returns
Type Description
void

Example

This example shows how to open a specified incident record in the navigator frame.

g_navigation.openRecord('incident', '4e49c0e81bf198101363ff37dc4bcb8a');

GlideNavigation - refreshNavigator()

Refreshes content in the navigator frame.

Table 7. Parameters
Name Type Description
None
Table 8. Returns
Type Description
void

Example

This example shows how to refresh the content in the navigator frame.

g_navigation.refreshNavigator();

GlideNavigation - reloadWindow()

Reloads the current frame.

Table 9. Parameters
Name Type Description
None
Table 10. Returns
Type Description
void

Example

This example shows how to refresh the content in the current frame.

g_navigation.reloadWindow();