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

Re: [ydn-javascript] Re: strange menuBar problem with onAvailable and IE

Expand Messages
  • Todd Kloots
    Are you sure that you tried initializing the menu inside a load event handler for the window (as in this example:
    Message 1 of 8 , Nov 30, 2006
    • 0 Attachment
      Are you sure that you tried initializing the menu
      inside a "load" event handler for the window (as in
      this example:
      http://developer.yahoo.com/yui/examples/menu/contextmenu.html)?
      If that case DOES throw a JavaScript error, I'd like
      you to send a URL to a repro case so that I can test
      it myself because that seems really strange.

      You could also try passing the id of the element that
      is the next sibling of the root node of your menu to
      the "onAvailable" method. Looking at your markup, it
      appears that'd be the DIV with the id of "yui-main."

      Thanks,
      Todd

      --- dgaryet <dgaryet@...> wrote:

      > I am having the same problem. I tried using
      > OnWindowLoad and it
      > didn't help. I am not aware of any other JavaScript
      > code doing a
      > document.write on my pages. An example of the
      > problem can be seen at:
      >
      >
      http://www.kidsspeakspanish.org/Test/www/index.shtml.
      > Just click on
      > the home menu item a few times and you will see it
      > happen (using IE6).
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      > (Yahoo! ID required)
      >
      > mailto:ydn-javascript-fullfeatured@yahoogroups.com
      >
      >
      >
      >
      >
      >
    • dgaryet
      Here is the content of espmenu.js, which is included in my page: // espmenu.js YAHOO.example.onWindowLoad = function(p_oEvent) { var oMenu = new
      Message 2 of 8 , Dec 3, 2006
      • 0 Attachment
        Here is the content of espmenu.js, which is included in my page:

        // espmenu.js

        YAHOO.example.onWindowLoad = function(p_oEvent)
        {
        var oMenu = new YAHOO.widget.Menu
        (
        "lhmenu",
        {
        position:"static",
        showdelay:50,
        hidedelay:750,
        lazyload:true
        }
        );

        oMenu.render();
        }

        // Initialize and render the menu when it is available in the DOM
        YAHOO.util.Event.addListener( window, "load",
        YAHOO.example.onWindowLoad );

        I tried moving the div containing my menu to after the yuimain div, as
        in
        http://developer.yahoo.com/yui/examples/menu/leftnavfrommarkup.html,
        and now it seems to work fine. Go figure.
      • srinu_chow
        Message 3 of 8 , Dec 3, 2006
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, "dgaryet" <dgaryet@...> wrote:
          >
          > Here is the content of espmenu.js, which is included in my page:
          >
          > // espmenu.js
          >
          > YAHOO.example.onWindowLoad = function(p_oEvent)
          > {
          > var oMenu = new YAHOO.widget.Menu
          > (
          > "lhmenu",
          > {
          > position:"static",
          > showdelay:50,
          > hidedelay:750,
          > lazyload:true
          > }
          > );
          >
          > oMenu.render();
          > }
          >
          > // Initialize and render the menu when it is available in the DOM
          > YAHOO.util.Event.addListener( window, "load",
          > YAHOO.example.onWindowLoad );
          >
          > I tried moving the div containing my menu to after the yuimain div, as
          > in
          > http://developer.yahoo.com/yui/examples/menu/leftnavfrommarkup.html,
          > and now it seems to work fine. Go figure.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.