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

Weird Problem with Menus

Expand Messages
  • Ken Robinson
    I ve started to write a page using a horizontal menu bar. I copied the code from one of the examples (I m using my own markup). My code seems to work fine with
    Message 1 of 2 , Aug 31 9:35 PM
    • 0 Attachment
      I've started to write a page using a horizontal menu bar. I copied
      the code from one of the examples (I'm using my own markup).

      My code seems to work fine with v0.11.2, but not with v0.11.3 using
      Firefox. The reverse is true when using MSIE 6!

      Here is an example that demonstrates the problem:
      <http://www.nnjsda.org/generic_menu_test.php>

      Invoking it with the above URL will make the script use v0.11.3
      Invoking it with <http://www.nnjsda.org/generic_menu_test.php?v=2>
      will make it use v0.11.2
      Putting the parameter "d=" on the URL will turn on the YAHOO Logger
      and use the debug version of which ever components are listed. For
      example
      <http://www.nnjsda.org/generic_menu_test.php?v=2&d=menu,yahoo> will
      invoke the script using the v0.11.2 versions of the JS files and the
      debug versions for menu.js & yahoo.js

      I'm generating the list structure using PHP, so it's quite possible
      that I messed up somewhere.

      Thanks in advance,

      Ken
    • Todd Kloots
      Ken - The problem is the click event handler that you have added to the document. That handler needs to check to make sure that the target of the event
      Message 2 of 2 , Sep 6, 2006
      • 0 Attachment
        Ken -

        The problem is the "click" event handler that you have
        added to the document. That handler needs to check to
        make sure that the target of the event wasn't the
        MenuBar instance or any of its child elements. I
        created an example for you:

        http://yuiblog.com/sandbox/yui/v0113/examples/menu/example02.php


        Alternatively you can take a look at the 0.11.3
        example for "Application Menubar:"

        http://developer.yahoo.com/yui/examples/menu/applicationmenubar.html

        I haven adjusted the scripts to demonstrate how you
        can get away with not having to use the
        YAHOO.widget.OverlayManager class for collapsing
        submenus. It is less code.

        - Todd




        --- Ken Robinson <kenrbnsn@...> wrote:

        > I've started to write a page using a horizontal menu
        > bar. I copied
        > the code from one of the examples (I'm using my own
        > markup).
        >
        > My code seems to work fine with v0.11.2, but not
        > with v0.11.3 using
        > Firefox. The reverse is true when using MSIE 6!
        >
        > Here is an example that demonstrates the problem:
        > <http://www.nnjsda.org/generic_menu_test.php>
        >
        > Invoking it with the above URL will make the script
        > use v0.11.3
        > Invoking it with
        > <http://www.nnjsda.org/generic_menu_test.php?v=2>
        > will make it use v0.11.2
        > Putting the parameter "d=" on the URL will turn on
        > the YAHOO Logger
        > and use the debug version of which ever components
        > are listed. For
        > example
        >
        <http://www.nnjsda.org/generic_menu_test.php?v=2&d=menu,yahoo>
        > will
        > invoke the script using the v0.11.2 versions of the
        > JS files and the
        > debug versions for menu.js & yahoo.js
        >
        > I'm generating the list structure using PHP, so it's
        > quite possible
        > that I messed up somewhere.
        >
        > Thanks in advance,
        >
        > Ken
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        > ydn-javascript-unsubscribe@yahoogroups.com
        >
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.