473,666 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.addMenu Item("View");
myMenu2.addMenu Separator();
myMenu2.addMenu Item("Modify");
myMenu2.addMenu Item("Propertie s");
myMenu2.addMenu Item("Delete");
myMenu2.addMenu Item("Purge");
myMenu2.hideOnM ouseOut=true;

window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenu Item("View");
myMenu3.hideOnM ouseOut=true;

... to n
</snip>
Jul 23 '05 #1
5 1769
We have similar problems, and the root of the problem is the sheer quantity
of items. Is there any way to pare that down?

"Christophe r Boyce" <cb******@yahoo .com> wrote in message
news:c6******** *************** ***@posting.goo gle.com...
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.addMenu Item("View");
myMenu2.addMenu Separator();
myMenu2.addMenu Item("Modify");
myMenu2.addMenu Item("Propertie s");
myMenu2.addMenu Item("Delete");
myMenu2.addMenu Item("Purge");
myMenu2.hideOnM ouseOut=true;

window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenu Item("View");
myMenu3.hideOnM ouseOut=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?

"Christophe r Boyce" <cb******@yahoo .com> wrote in message
news:c6******** *************** ***@posting.goo gle.com...
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.addMenu Item("View");
myMenu2.addMenu Separator();
myMenu2.addMenu Item("Modify");
myMenu2.addMenu Item("Propertie s");
myMenu2.addMenu Item("Delete");
myMenu2.addMenu Item("Purge");
myMenu2.hideOnM ouseOut=true;

window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenu Item("View");
myMenu3.hideOnM ouseOut=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.addMenu Item("View");
myMenu2.addMenu Separator();
myMenu2.addMenu Item("Modify");
myMenu2.addMenu Item("Propertie s");
myMenu2.addMenu Item("Delete");
myMenu2.addMenu Item("Purge");
myMenu2.hideOnM ouseOut=true;

window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenu Item("View");
myMenu3.hideOnM ouseOut=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***@access4l ess.com.net.org .uk> wrote in message news:<10******* ******@corp.sup ernews.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.addMenu Item("View");
myMenu2.addMenu Separator();
myMenu2.addMenu Item("Modify");
myMenu2.addMenu Item("Propertie s");
myMenu2.addMenu Item("Delete");
myMenu2.addMenu Item("Purge");
myMenu2.hideOnM ouseOut=true;

window.myMenu3 = new Menu("myMenu3", 120, 18, "Verdanda", 11,
"#000000", "#000000", "#CCCCCC", "#CCCCCC");
myMenu3.addMenu Item("View");
myMenu3.hideOnM ouseOut=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
5691
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 difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
7
2717
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 menu displays well. If I then click on the second link, the first menu from the first link still displays. How do I get make the first menu disappear when I click on the second and vice versa? Please help...thanks.
2
3876
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 http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
16
2937
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 ability to define a subsection to be open when you land on a page, but when you select another option for it to open that section and close the previously open one. I though i'd got round this by adding a class to the nested ol and setting it to...
11
2212
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 HTML file. It never needs to be reloaded and JS variables can be updated there as the visible screens progress. But...if I want to be a good internet samaritan and not use frames, what's the best way to replace that function?
12
2577
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 than one line and the text simply overlaps the sub-menus below it. I thought i had got around this by placing empty 'spacers' like so; oFoldMenu.make('sub3','')//spacer unfortunately, i have just viewed the site in IExplorer and it has added...
3
2305
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 Yahoo do not have any dropdown menus. Are dropdown menus a concern when designing webpages in the context as mentioned above? Thanks in advance, RABMissouri2007
9
2914
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 JavaScript. I have used a readymade javascript and there are variables like...
84
3939
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. 2. Client side processing: Web server gets form input and passes it to PHP which includes the Javascript written in a way to make the form input processed on the client side and rendered (probably using DOM function calls) on that side as...
0
8779
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1761
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.