Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:05

Random bug with MSIE6 & mmenudom.js & nested <scr


Poster: cmanley
Dated: Saturday May 13 2006 - 3:51:01 BST

Hi,
I'm evaluating this nice menu system in a test site to see if it's suitable before buying any licences. All's going well in Firefox, Opera, and MSIE6 except for this:

In about 1 out of 5 refreshes of the site in MSIE6 a javascript error occurs that I can't debug because it's in an anonymous function (or so the debugger says). I've minimized the javascript being used and left the menus out and found that it occurs only when this line is included:
<script type="text/javascript" src="menu/mmenudom.js"></script>
... and when nested deep inside the page this line is included:
<script type="text/javascript"><!-- // if I remove this script block then no errors occur //--></script>

It is so weird because without that empty script block the error never occurs. This smells like it's got something to do with a timer and with walking the DOM tree. I suspect therefore that it's caused by code that injects the MILONIC text into the menu.

Try it for yourself to find out... just remove that script block and no more errors occur.

This site is here (but will change soon as it's in development):
http://bioreform.ath.cx/
It's validated xhtml 1.1.
No script errors ever occur in Firefox and Opera.

Please help...

Causes and solution found


Poster: cmanley
Dated: Saturday May 13 2006 - 14:43:49 BST

Hi,
I found a solution to the bug.
It occurs when you use MSIE6, mmenudom.js, and a <script>..</script> block anywhere below a table row element that has a calculated height using the MSIE specific css command 'height: expression(...)'. My expression contains references to different elements in the page using getElementById(...). Somehow without the combination of all 3 of the bug's requirements mentioned above, the expression is evaluated after the elements have been created by the browser. If all 3 of the bug's requirements are met, then in about 1 in 5 browser refreshes, the css height expression is evaluated before the elements it references have been created.
The solution is to use javascript to set the expression at the bottom of the body or in a onload handler.

Really weird!


Poster: Migru
Dated: Saturday May 13 2006 - 16:55:18 BST

Hi,-
I don´t understand, maybe you´ll provide an explanation, but which application requires the use of the Milonic files without a menu_data.js and instead of that an empty, as you say "<script>..</script> block anywhere below a table row element that has a calculated height using the MSIE specific css command 'height: expression(...)'. ".... ??

Quote:
I found a solution to the bug.


what but ? Bug of IE6 ? A Milonic menu-systems bug ?

Michael


Poster: benwalsh
Dated: Sunday May 14 2006 - 16:32:32 BST

so this "bug" will only occur if the 'height: expression is used, I think this clears us.


Poster: cmanley
Dated: Monday May 15 2006 - 21:09:23 BST

benwalsh wrote:
so this "bug" will only occur if the 'height: expression is used, I think this clears us.


uhh no, it'll occur only when all 3 of the requirements I mentioned are present. It's weird but not important anymore as I've solved the problem.


Poster: cmanley
Dated: Monday May 15 2006 - 21:13:22 BST

Migru wrote:
Hi,-

what but ? Bug of IE6 ? A Milonic menu-systems bug ?

Michael


I've got no idea where the 'bug' is in because I can't read and debug the source code. It's only the combination of 3 seemingly unrelated things that causes it to occur.