C
Christopher Boyce
I am using the fw_menu.js from John Ahlquist (October 2000). The menu
works great, but the problem I am having is with it's speed in IE6.
The problem is I am making a menu for each item in a list (160 items).
It takes around 17 seconds to display the page with this javascript.
If I pull it out the page opens in about a second.
I would like to be able to use one Menu Object and each time I click
on an item, have it reset the Menu Object and call the addMenuItem
Method for whatever I want to pass in.
I have tried to add a Method to fw_menu.js, by setting:
function resetMenuList() {
this.item = new Array();
this.actions = new Array();
}
This does not seem to work.
See below for my menu list, this would have 160 menus, but I only put
the first two in.
Thanks for any help,
Chris
<snip>
function loadMenus() {
window.myMenu2 = new Menu("myMenu2", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu2.addMenuItem("View");
myMenu2.addMenuSeparator();
myMenu2.addMenuItem("Modify");
myMenu2.addMenuItem("Properties");
myMenu2.addMenuItem("Delete");
myMenu2.addMenuItem("Purge");
myMenu2.hideOnMouseOut=true;
window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenuItem("View");
myMenu3.hideOnMouseOut=true;
... to n
</snip>
works great, but the problem I am having is with it's speed in IE6.
The problem is I am making a menu for each item in a list (160 items).
It takes around 17 seconds to display the page with this javascript.
If I pull it out the page opens in about a second.
I would like to be able to use one Menu Object and each time I click
on an item, have it reset the Menu Object and call the addMenuItem
Method for whatever I want to pass in.
I have tried to add a Method to fw_menu.js, by setting:
function resetMenuList() {
this.item = new Array();
this.actions = new Array();
}
This does not seem to work.
See below for my menu list, this would have 160 menus, but I only put
the first two in.
Thanks for any help,
Chris
<snip>
function loadMenus() {
window.myMenu2 = new Menu("myMenu2", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu2.addMenuItem("View");
myMenu2.addMenuSeparator();
myMenu2.addMenuItem("Modify");
myMenu2.addMenuItem("Properties");
myMenu2.addMenuItem("Delete");
myMenu2.addMenuItem("Purge");
myMenu2.hideOnMouseOut=true;
window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenuItem("View");
myMenu3.hideOnMouseOut=true;
... to n
</snip>