Delete Menu Items and Menus
Delete Menu Items
- Open pop-up_menu.js
file. Dreamweaver is recommended but any suitable text editor can be
used (Windows: Notepad or Wordpad, Macintosh: SimpleText).
- Scroll to the comment // Pop-Up Box Arrays and find a list
of arrays with menu items 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[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:
- 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");
- 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.
- Save and close the file.
Delete a Menu Set (array)
- Open pop-up_menu.js
file. Dreamweaver is recommended but any suitable text editor can be
used (Windows: Notepad or Wordpad, Macintosh: SimpleText).
- Scroll to the comment // Pop-Up Box Arrays and find a list
of arrays with menu items 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[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:
- Find the array menu that is to be deleted and delete the entire array.
- Save and close the file
- Open the Javascript file write_boxes.js.
- 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")); }
- Delete the document.write(boxGen("DeletedMenuArray"));
line from the code.
- For example if the Fbox array menu (above) is being deleted, then
the document.write line in bold (above) is also deleted.
- Save and close the file.
- Delete
the pop-up menu from nav_top.lbi
file.
|