Loading ...
Sorry, an error occurred while loading the content.

2770Bug in YUI MenuModule (menu.js, line 1332)?

Expand Messages
  • aglenning
    Jul 4, 2006
      I am creating a menu from existing markup. Unlike the examples
      provided, the markup does not have hyperlinks in the menu items -
      instead I am adding a custom clickEvent handler.

      When I click on a menu item, the YUI javascript crashes in
      menu.js(1332). The problem appears that the
      MenuModule.protype._onelementClick function assumes there must be a
      URL in each menu item. I can fix the problem by updating the line:

      bCurrentPageURL = (sURL.substr((sURL.length-1),1) == "#");


      bCurrentPageURL = !sURL || (sURL.substr((sURL.length-1),1) == "#");

      since there is no url property in my menu items.

      Am I doing something wrong, or is this a bug?

      Many thanks,
    • Show all 3 messages in this topic