GlideNavigation - Client

  • Release version: Xanadu
  • Updated August 1, 2024
  • 1 minute to read
  • 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

    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 3. Parameters
    Name Type Description
    url String URL to open.
    name String Window name.
    features String Comma separated list of features for the popup window.
    noStack Boolean Flag that indicates whether to append sysparm_stack=no to the URL. This parameter helps prevent unexpected behavior when using the form back button.
    Valid values:
    • true: Append sysparm_stack=no to the URL.
    • false: Do not append sysparm_stack=no to the URL.
    Table 4. Returns
    Type Description
    Window Instance of the new window.

    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

    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

    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

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

    g_navigation.reloadWindow();