Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:10
Menu Slowness in IE
Poster: glin
Dated: Tuesday September 14 2004 - 9:25:46 BST
Hi,
I am new to milonic. I noticed that it takes a very long time for the drop down menu to appear. 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
Poster: John
Dated: Tuesday September 14 2004 - 15:11:47 BST
First, this is a no-no...
Code:
<a href="http://www.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:
<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?
Poster: glin
Dated: Tuesday September 14 2004 - 17:39:12 BST
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
Poster: John
Dated: Tuesday September 14 2004 - 18:26:33 BST
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
We'll get it solved.
Poster: glin
Dated: Tuesday September 14 2004 - 21:03:46 BST
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
Poster: kevin3442
Dated: Tuesday September 14 2004 - 22:07:53 BST
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:
with( milonic = new menuname("services.web3") )
{
style=menuStyle;
}
</script>
{
style=menuStyle;
}
</script>
You need to place a call to drawMenus() before the closing </script> tag, like this
Code:
with( milonic = new menuname("services.web3") )
{
style=menuStyle;
}
drawMenus();
</script>
{
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:
<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>
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:
<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>
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