473,382 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

javascript menus and speed

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>
Jul 23 '05 #1
5 1756
We have similar problems, and the root of the problem is the sheer quantity
of items. Is there any way to pare that down?

"Christopher Boyce" <cb******@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
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>

Jul 23 '05 #2
I really can't limit the list. In fact it could get bigger.

Thanks,

Chris

"William Morris" <ne***************************@seamlyne.com> wrote in message news:<c6************@ID-205671.news.uni-berlin.de>...
We have similar problems, and the root of the problem is the sheer quantity
of items. Is there any way to pare that down?

"Christopher Boyce" <cb******@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
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>

Jul 23 '05 #3
Christopher Boyce wrote:
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>


Can your menu be viewed on the web, url?
Mike

Jul 23 '05 #4
You can see it here: http://www.christopherleeboyce.com/test/test.html

Chris

mscir <ms***@access4less.com.net.org.uk> wrote in message news:<10*************@corp.supernews.com>...
Christopher Boyce wrote:
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>


Can your menu be viewed on the web, url?
Mike

Jul 23 '05 #5
Christopher Boyce wrote:
You can see it here: http://www.christopherleeboyce.com/test/test.html

Chris


Since you're using an identical menu for every table anchor, I'd make a
single menu using divs (and css for special effects).

When an anchor in a table cell is clicked, move the menu to the table
row that was clicked and then make it visible, positioned over the
clicked anchor so the mouse is already over the menu, then you can hide
the menu if the mouse moves over the table (off of the menu divs).

So instead of 106 identical menus you use one single menu, and a global
var that is set on each row's anchor click (to the row number).

Document/Web Page/etc. names can be stored in an array with element
numbers matching the table row numbers, so generic view, properties,
delete, purge etc. functions can work using the array element number
stored in the global var.

I sent you an example that includes this menu approach with your table.
The page loads in 1 second or less (requires no external .js or .css
files, no menu rendering, and is significantly smaller than the original
approach).

Good Luck,
Mike

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
7
by: Marci | last post by:
I found this script for cascading menus, however, I cannot reach the author to solve the bug I am having when I add a second menu to it. My problem is this: If I click on the first link, the...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
16
by: Jay | last post by:
I've been using Travis's Expanding Menu (http://www.squidfingers.com/code/dhtml/expandingmenu/) for a site i'm working on. The problem is I need to add some functionality to it. I need the the...
11
by: Kent Feiler | last post by:
One thing I like about frames is that they're a good place to stow Javascript. Javascript that I'd like to be around while the visible content of the screen changes goes in the frame declaration...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
3
by: RAB | last post by:
I read on a CSS posting site where the author didn't like Javascript and dropdown menus because not all users can view them due to network and firewall restrictions. Then I noticed that MSN and...
9
by: Mahernoz | last post by:
Hello Friends, The JavaScript File exmplmenu_var.js contains the code... (for the sake of brevity i am showing only that code which needs to be changed) I am actually developing a menu using...
84
by: Patient Guy | last post by:
Which is the better approach in working with Javascript? 1. Server side processing: Web server gets form input, runs it into the Javascript module, and PHP collects the output for document prep....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.