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

mouse over first submenu breaks in IE only


Poster: iolog
Dated: Tuesday February 14 2006 - 20:54:09 GMT

Hello,

I'm encountering an IE only problem with the menu system.

When you mouse over the first (the first one added) sub-menu, a javascript error is thrown. In Firefox and Opera, there is no issue.

It doesn't seem to have anything to do with the content of the menu, as I have re-arragned items randomly.

Link to site:

http://www.certicom.com/index.php?action=test,milonic

In the above case, Going to Company --> Executives throws a JS error. But going to any other menu item doesn't. I have tried removing executives, in which case "Investors" throws the error.

Because the menu is generated dynamically from CMS content, it's a little difficult to post the JS code which creates the menu, but essentailly it looks something like this (using the PHP api):

Any help would be appreciated.

Code:
function buildLocs($locs,$parentID,$depth){


   $mmMenu=new mMenu();
   if ( $depth == 1 ){

      $mmMenu->style="menuStyle";
      $mmMenu->alwaysvisible="true";
      $mmMenu->orientation="horizontal";
      $mmMenu->position="relative";
      $mmMenu->itemheight="21";            
   }
   else $mmMenu->style = "submenuStyle";


   foreach($locs as $l){

      // URL code excluded..
      $url = 'the url';
      
      if ($depth == 1) $title = strtoupper($l->title);
      else $title = $l->title;

      $title = $title . " ";


      if ( $l->locations && $depth < 3 ) $mmMenu->addItemFromText("showmenu=id_$l->id;text=$title;url=$url;");
      else $mmMenu->addItemFromText("text=$title;url=$url;");
   }
   
   $mmMenu->createMenu("id_".$parentID);      

   if ($depth < 3){         
      $nextDepth = $depth+1;
      foreach($locs as $l){
         if ($l->locations) buildLocs($l->locations,$l->id."",$nextDepth);
      }
   }


}


Poster: Migru
Dated: Tuesday February 14 2006 - 21:22:45 GMT

Hi

the menu is positioned relative in a table cell. To do it correct, please follow suggestions given here

http://www.milonic.com/forum/viewtopic.php?t=6527


compare with the code your code-generator has created.


Michael


Poster: Andy
Dated: Saturday February 25 2006 - 18:10:26 GMT

Looks as though it's working, is it OK now?


Poster: Migru
Dated: Saturday February 25 2006 - 20:28:42 GMT

Hi

the "menustyle.." too should be part of that js menu code which contains the subs and the submenuStyle (after the body tag), whereas the table cell has to contain the mainmenu only with its own drawMenus() !

Michael