Menu Slowness in IE

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
glin
Advanced
Advanced
Posts: 10
Joined: Tue Sep 14, 2004 9:18 am

Menu Slowness in IE

Post by glin »

Hi,
I am new to milonic. I noticed that it takes a very long time for the drop down menu to appear. :cry: This make the menu almost not usable. Here is my testsite: https://my.bugfamily.com/index.jsp?id=services.web.mail

Can you please give me some pointers for how to boost up the performance? Thanks,
-- Gary
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

First, this is a no-no...

Code: Select all

<a href="https://milonic.com/"><img src=""></a>
That needs to be a real link, not a phony like you have. Understandably, we're quite touchy about this.

Code: Select all

<td nowarp>
Hmmm - running on impulse engines only, eh? I assume you mean "nowrap".

I'm not getting any menu at all. Move the JS menu calls up to the first items after the body tag.

You've split the style and menu items into two JS files. Any particular reason?
John
glin
Advanced
Advanced
Posts: 10
Joined: Tue Sep 14, 2004 9:18 am

Post by glin »

Thanks, I will give it a try.
Sorry for the broken Milonic link. It is only there because this is a testsite. I have been experimenting with various js menu product and actually I like Milonic the most so far. If I can get the slowness problem to square away, I probably will purchase a license for the site. Thanks,

-- Gary
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Thanks, Gary.

Are you using a local webservice or going out and grabbing it from another location? Sometimes those things can be slow in responding (I speak from experience!), which might affect the menu.

BTW, don't nother looking anywhere else for a menu system - this one is the best :!: :D

We'll get it solved.
John
glin
Advanced
Advanced
Posts: 10
Joined: Tue Sep 14, 2004 9:18 am

Post by glin »

Hi John, Thank you so much for the promptly response. I move the script block to the beginning of the body as you suggested, but the menu is still very slow. =( Does Milonic menu do any traversal on the DOM tree? I have many nested table, I am not sure if this could be the problem? The strange thing is, this only happens on IE. Mozilla runs perfectly and very fast.

You can see my modification located at: https://my.bugfamily.com/test.html

Any idea is greatly approciated.

One last note, the reason I choose Milonic is because other menus out there does not workaround the problem where the <select> overlaps with the popup menu on IE. Milonic worked around this problem beautifully. Although I am not a javascript expert at all, but I am certain you guys have spent quite some time to get this to work. ;)

Now I am just hopping I can get this last problem to square away.

Thanks,
-- Gary
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Gary,

The menu is slow because you have your menus (all of them) in a table, but you have not quite implemented the table-bound approach correctly. I'll refer you to sample9 (relatively positioned, table-bound menu). WHat you should do is:

(1) Remove your "Main Menu" definition from the script at the top of the <body> where you have all of your other menus defined. Place the "Main Menu" definition in the table cell where you currently have a call to drawMenus(). Leave the call to drawMenus() in the cell; it should come after the menu definition (i.e., drawMenus() is the last thing in the cell).

(2) You need another call to drawMenus() at the end of all of the other menu script that you have at the top of the <body>. I.e., your last bit of menu code at the top of the <body> is

Code: Select all

with( milonic = new menuname("services.web3") )
{
    style=menuStyle;
}
</script>
You need to place a call to drawMenus() before the closing </script> tag, like this

Code: Select all

with( milonic = new menuname("services.web3") )
{
    style=menuStyle;
}
drawMenus();
</script>
(3) Separate the loading of the base .js files and your inline menu definitions into two separate script blocks. I.e., change:

Code: Select all

<script type="text/javascript">
    if(ns4)
	_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
    else
	_d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");

    
//    _menuCloseDelay=500
//    _menuOpenDelay=150
    _menuCloseDelay=50
    _menuOpenDelay=15
    with ( mainStyle = new mm_style() )
    {
        //onbgcolor="#C1D2EE";
        oncolor="#000000";
        //offbgcolor="#EFEDDE";
        offcolor="#000000";

...etc.


drawMenus();
</script>
to two separate blocks, like this:

Code: Select all

<script type="text/javascript">
  if(ns4)
    _d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
  else
    _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>

<script type="text/javascript">
//  _menuCloseDelay=500
//  _menuOpenDelay=150
  _menuCloseDelay=50
  _menuOpenDelay=15

  with ( mainStyle = new mm_style() ) {
    //onbgcolor="#C1D2EE";
    oncolor="#000000";
    //offbgcolor="#EFEDDE";
    offcolor="#000000";

...etc.

drawMenus();
</script>
Those things should make your menu perform just fine.

Hope that helps,

Kevin
glin
Advanced
Advanced
Posts: 10
Joined: Tue Sep 14, 2004 9:18 am

Post by glin »

Thanks so much!!! :D So stupid of me.
I got it working now and it is VERY FAST! 8O

You just made one happy customer. ;)

-- Gary
Post Reply