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: Select all
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);
}
}
}