javascript menus and speed

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>
 
W

William Morris

We have similar problems, and the root of the problem is the sheer quantity
of items. Is there any way to pare that down?
 
C

Christopher Boyce

I really can't limit the list. In fact it could get bigger.

Thanks,

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top