Local Menu Help

Local.JS code

TIME SAVER! -- The code shown in the examples may be highlighted, copied (CNTRL+C),  then pasted into your local menu (CNTRL+V) at which point, they may be  modified for your specific needs. This will eliminate retyping the entire command.

    Creating Drop Down Options with links to: 


General Info on Local Menus

Local menus are used to create consistent navigation across the VCUHS intranet. These local menus (identified by their name local.js) are created, modified and maintained by the individual departments.

As new local menus are required, the path must be altered under the HTML View. For example, a new local menu is needed on the Department page so the original is copied, renamed, and stored in a different folder. Once completed, the source code (HTML) must be changed to show (or point to) the location of the Local.js as shown below.

 

 


 

Back to Top

Creating a new Local Menu

  • Find an existing one similar to what you need. 
  • Right click on the existing local.js, select Copy.
  • Move to appropriate folder.
  • Right click on target folder, select Paste.

 

Back to Top

Pointing to a new Local Menu

  • Click on the HTML View Tab
  • Locate the script pointing to local.js
    Note -- It is located towards the top of the HTML code, approximately the 2nd or 3rd script.
  • Correct the path name to the local.js file.
  • Click on the NORMAL View Tab and continue with web development.

 
Back to Top

Command Line

A command line provides clean coding; aids in easily identifying new menu options/headings. 

  • Command: //Menu heading
  • Example:  //Benefits Overview
Back to Top

Menu Heading

This is the literal value of what will appear as the label for a drop down menu.

  • Command: addICPMenu("Heading","Heading","","");
  • Example:  addICPMenu("Benefits Overview","Benefits Overview","","");
Back to Top

Links to Internal Pages

This code will create an option on a drop down menu and link to an internal page. 

  • Command: addICPSubMenu("Heading","Menu Option","Path to Link","");
  • Example: 
    addICPSubMenu("Intranet Information","Go LiveRequest","/departments/is/intranet/go_live.htm","");

     

 

Back to Top

Link to Internal Bookmark

This code will create an option on a drop down menu and link to an internal bookmark. 

  • Command: addICPSubMenu("Heading","Menu Option","Path_to_Link#Bookmark","");
  • Example:  
    addICPSubMenu("Go To","Millennium2 Newsletter","/publications.htm#Millennium2");

 

Back to Top

Link to a VCUHS Intranet page that is outside of your  site

This code will create an option on a drop down menu and link to an VCUHS page within our intranet but not physically located within your department's web. Since it is still within our intranet, it is not necessary to open a new window. 

  • Command: addICPSubMenu("Heading","Menu Option","full Path","");
  • Example:  
    addICPSubMenu("Go To","Department Listing","http://vcuhsweb.mcvh-vcu.edu/departments/default.htm","");
Back to Top

Link to an External Web Page

Similar to linking to a VCUHS page within our intranet, but this code creates an option on a drop down menu and link to an web site outside of our intranet. Since it is outside of our intranet, the page must be opened a new window. .

  • Command: addICPSubMenu("Heading","Menu Option","Full Path","Window title");
  • Example:  addICPSubMenu("Go To","Palm Pilot","http://www.palm.com","Palm");

 

Back to Top

A Site Under Construction

If a site displayed on a menu is currently being developed, the item should be mapped to an "under construction" site where the user is asked to try again at a later time. Additionally, by using this command, it menu item will be dithered (i.e. displayed in gray vs. white text).

  • Command: addICPSubMenu("Heading","Menu Option",path to the standard VCUHS construction message);
  • Example:  
    addICPSubMenu("People","Volunteers",strunderconstruction);

 

Back to Top
 

Go to Previous Page

This code will create an option on a drop down menu to link to the previous page eleminating the need to use browser's back button.  

  • Command: addICPSubMenu("Heading","Menu Option","script","");
  • Example: 
    addICPSubMenu("Go To","Previous Page","javascript:history.back()");

     
Back to Top

 

Maintained by: Amy Herrmann, Information Systems
Revised: April 04, 2003