Collapse Navigation and Header Frames via Script

Every once in a while I come across some script functions that might be useful given the right requirement. This article is one of those cases. In the post below I’ll show you how you can leverage some built-in client-side functions to show and hide the navigation and header frames in ServiceNow.

Navigation/Banner Frames

Navigation Frame

The navigation frame can be hidden, shown, or toggled using the following functions…

//Hide the left nav

//Show the left nav

//Toggle the left nav

Here’s an example global UI script that you could use to hide the left nav from end-users

‘HideLeftNav’ UI Script
Name: ‘HideLeftNav’
Global: true
Description: Hide the left nav for end users

addLoadEvent(hideLeftNav);function hideLeftNav(){
//If the user has no roles
//Hide the left nav
//Hide the toggle image (optional)


Header/Banner Frame

The banner doesn’t have as many functions available to it, but you can still toggle the banner like this…

//Toggle the header/banner

Date Posted:

November 6, 2012

Share This:


  1. Mark Landis November 15, 2012 at 1:48 pm

    Would there be a way to hide the bottom frame via script? I’ve had several individuals who somehow activated the bottom frame without realizing, but did not drag it out to make its contents visible.

    This caused links clicked in lists/nav windows to load in the hidden frame.

    Thanks in advance!

  2. Priya October 25, 2013 at 4:45 pm

    Hi Mark,

    These functions doesn’t work as expected in ServiceNow New UI. Is there any other method which can be used to hide header and navigator for ServiceNow new UI?


Comments are closed.




Fresh Content
Direct to Your Inbox

Just add your email and hit subscribe to stay informed.