Hover menu’s utilizing mm_menu.js fail in IE10 and greater


A legacy site that was built about 9 years ago Macromedia Dreamweaver was having errors with drop down menus when using Internet Explorer 10. After digging in, it looked like there was a “document.all” call that was failing in the “function FIND(item)” that worked on previous versions of IE. The function goes through a couple of steps trying to find an item on the page. All I did for my quick fix was re-order function so that case that will work the most happens first, thus avoiding this error. Little hacky, but it works. Here is the updated FIND function if you’re looking to just patch it and be done with it:

JavaScript (for mm_menu.js)

function FIND(item) {
   if (document.getElementById) return(document.getElementById(item));
   if( window.mmIsOpera ) return(document.getElementById(item));
   if (document.all) return(document.all[item]);
   return(false);
}

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.