Previous Page | Right click this page to print.

Delete Menu Items and Menus

Delete Menu Items

  1. Open pop-up_menu.js file. Dreamweaver is recommended but any suitable text editor can be used (Windows: Notepad or Wordpad, Macintosh: SimpleText).
  2. Scroll to the comment // Pop-Up Box Arrays and find a list of arrays with menu items like this:
  3.         Fbox=new Array();
    Fbox.id="boxF";
    Fbox.imgname="F";
    Fbox[0]=new boxLink("Unit 4","");
    Fbox[1]=new boxLink("Objectives","four/index.htm");
    Fbox[2]=new boxLink("Lecture","four/lecture.htm");
    Fbox[3]=new boxLink("Readings","four/readings.htm");
    Fbox[4]=new boxLink("Activities","four/activities.htm");
    Fbox[5]=new boxLink("Assessment","four/assessment.htm");
    The above code will produce a pop-up menu resembling the following:
    a popup menu that can be found in the site.
  4. Delete the numbered [0] line(s) that correspond to the menu items that need to be removed.
    • For example in the above, the menu heading "Readings" is no longer wanted. So the line Fbox[3] is deleted and the code now looks like this:
            Fbox=new Array();
    Fbox.id="boxF";
    Fbox.imgname="F";
    Fbox[0]=new boxLink("Unit 4","");
    Fbox[1]=new boxLink("Objectives","four/index.htm");
    Fbox[2]=new boxLink("Lecture","four/lecture.htm");
    Fbox[4]=new boxLink("Activities","four/activities.htm");
    Fbox[5]=new boxLink("Assessment","four/assessment.htm");
  5. Edit the line numbers so they are still sequential.
    • The code should now resemble the following (changes in bold):
    •         Fbox=new Array();
      Fbox.id="boxF";
      Fbox.imgname="F";
      Fbox[0]=new boxLink("Unit 4","");
      Fbox[1]=new boxLink("Objectives","four/index.htm");
      Fbox[2]=new boxLink("Lecture","four/lecture.htm");
      Fbox[3]=new boxLink("Activities","four/activities.htm");
      Fbox[4]=new boxLink("Assessment","four/assessment.htm");
    • This is extremely important if the pop-up menus are to work correctly.

  6. Save and close the file.

Delete a Menu Set (array)

  1. Open pop-up_menu.js file. Dreamweaver is recommended but any suitable text editor can be used (Windows: Notepad or Wordpad, Macintosh: SimpleText).
  2. Scroll to the comment // Pop-Up Box Arrays and find a list of arrays with menu items like this:
  3.         Fbox=new Array();
    Fbox.id="boxF";
    Fbox.imgname="F";
    Fbox[0]=new boxLink("Unit 4","");
    Fbox[1]=new boxLink("Objectives","four/index.htm");
    Fbox[2]=new boxLink("Lecture","four/lecture.htm");
    Fbox[3]=new boxLink("Readings","four/readings.htm");
    Fbox[4]=new boxLink("Activities","four/activities.htm");
    Fbox[5]=new boxLink("Assessment","four/assessment.htm");
    The above code will produce a pop-up menu resembling the following:
    a popup menu that can be found in the site.
  4. Find the array menu that is to be deleted and delete the entire array.
  5. Save and close the file
  6. Open the Javascript file write_boxes.js.
  7. In the file the code should be similar to the following:
    /* This information MUST be at the BOTTOM of the 'Web Page' for best browser support. */
    if(!ie)
    {
    document.write(boxGen("Abox"));
    document.write(boxGen("Bbox"));
    document.write(boxGen("Cbox"));
    document.write(boxGen("Dbox"));
    document.write(boxGen("Ebox"));
    document.write(boxGen("Fbox"));
    document.write(boxGen("Gbox"));
    document.write(boxGen("Hbox"));
    document.write(boxGen("Ibox"));
    document.write(boxGen("Jbox"));
    document.write(boxGen("Kbox"));
    document.write(boxGen("Lbox"));
    }
  8. Delete the document.write(boxGen("DeletedMenuArray")); line from the code.
  9. For example if the Fbox array menu (above) is being deleted, then the document.write line in bold (above) is also deleted.
  10. Save and close the file.
  11. Delete the pop-up menu from nav_top.lbi file.

 

Previous Page | Right click this page to print.