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

strange menuBar problem with onAvailable and IE

Expand Messages
  • mscanlon17
    I am having a strange problem here. I am using the same code as the build Menu From Markup with Animation example with a different menu structure and a
    Message 1 of 8 , Nov 16, 2006
    • 0 Attachment
      I am having a strange problem here. I am using the same code as the
      build Menu From Markup with Animation example with a different menu
      structure and a different css file. However in IE, the onAvailable
      does not work all the time. I get a error message that says "Internet
      Explorer could not open the Internet Site (URL)." Even after most of
      the page has loaded. If I use onWindowLoad event it works just fine
      but the onAvailable does not work. I also tried the new
      onContentAvailable method and I get the same thing. Has anyone else
      run into this problem before? It is really stumping me.

      Thanks,
      Mike
    • Todd Kloots
      Hey Mike - If onContentReady is failing you as well, can you please provide us with an example page that we can use to reproduce and (hopefully) fix the bug
      Message 2 of 8 , Nov 16, 2006
      • 0 Attachment
        Hey Mike -

        If "onContentReady" is failing you as well, can you
        please provide us with an example page that we can use
        to reproduce and (hopefully) fix the bug for the next
        release?

        In the meantime, you can either instantiate your menu
        instance using a "load" event handler for the window
        object, or use "onAvailable" to detect the HTML
        element that is the next sibling of the root node of
        your menu element. Either technique should ensure
        that your menu's childNodes are fully loaded in the
        browser. Let me know if that doesn't work or make
        sense.

        - Todd

        --- mscanlon17 <mscanlon17@...> wrote:

        > I am having a strange problem here. I am using the
        > same code as the
        > build Menu From Markup with Animation example with a
        > different menu
        > structure and a different css file. However in IE,
        > the onAvailable
        > does not work all the time. I get a error message
        > that says "Internet
        > Explorer could not open the Internet Site (URL)."
        > Even after most of
        > the page has loaded. If I use onWindowLoad event it
        > works just fine
        > but the onAvailable does not work. I also tried the
        > new
        > onContentAvailable method and I get the same thing.
        > Has anyone else
        > run into this problem before? It is really stumping
        > me.
        >
        > Thanks,
        > Mike
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        > (Yahoo! ID required)
        >
        > mailto:ydn-javascript-fullfeatured@yahoogroups.com
        >
        >
        >
        >
        >
        >
      • mscanlon17
        Thanks for the help. Just to let you know that onAvailable was having the same problem as onContentReady. I think I may have found the problem. Another
        Message 3 of 8 , Nov 17, 2006
        • 0 Attachment
          Thanks for the help. Just to let you know that onAvailable was having
          the same problem as onContentReady. I think I may have found the
          problem. Another third party javascript program was doing a
          document.write that I think is messing everything up. Does this seem
          like an answer to this. I guess I will go back to using
          YAHOO.util.Event.addListener(window, "load",
          YAHOO.example.onWindowLoad); as this works just fine. I was just
          trying to find a way to start the menus to load a little earlier.


          --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
          >
          > Hey Mike -
          >
          > If "onContentReady" is failing you as well, can you
          > please provide us with an example page that we can use
          > to reproduce and (hopefully) fix the bug for the next
          > release?
          >
          > In the meantime, you can either instantiate your menu
          > instance using a "load" event handler for the window
          > object, or use "onAvailable" to detect the HTML
          > element that is the next sibling of the root node of
          > your menu element. Either technique should ensure
          > that your menu's childNodes are fully loaded in the
          > browser. Let me know if that doesn't work or make
          > sense.
          >
          > - Todd
          >
          > --- mscanlon17 <mscanlon17@...> wrote:
          >
          > > I am having a strange problem here. I am using the
          > > same code as the
          > > build Menu From Markup with Animation example with a
          > > different menu
          > > structure and a different css file. However in IE,
          > > the onAvailable
          > > does not work all the time. I get a error message
          > > that says "Internet
          > > Explorer could not open the Internet Site (URL)."
          > > Even after most of
          > > the page has loaded. If I use onWindowLoad event it
          > > works just fine
          > > but the onAvailable does not work. I also tried the
          > > new
          > > onContentAvailable method and I get the same thing.
          > > Has anyone else
          > > run into this problem before? It is really stumping
          > > me.
          > >
          > > Thanks,
          > > Mike
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > > (Yahoo! ID required)
          > >
          > > mailto:ydn-javascript-fullfeatured@yahoogroups.com
          > >
          > >
          > >
          > >
          > >
          > >
          >
        • Todd Kloots
          If you are using document.write, then I think that it would be safest to move back to a load event handler for the window.
          Message 4 of 8 , Nov 17, 2006
          • 0 Attachment
            If you are using document.write, then I think that it
            would be safest to move back to a "load" event handler
            for the window.


            --- mscanlon17 <mscanlon17@...> wrote:

            > Thanks for the help. Just to let you know that
            > onAvailable was having
            > the same problem as onContentReady. I think I may
            > have found the
            > problem. Another third party javascript program was
            > doing a
            > document.write that I think is messing everything
            > up. Does this seem
            > like an answer to this. I guess I will go back to
            > using
            > YAHOO.util.Event.addListener(window, "load",
            > YAHOO.example.onWindowLoad); as this works just
            > fine. I was just
            > trying to find a way to start the menus to load a
            > little earlier.
            >
            >
            > --- In ydn-javascript@yahoogroups.com, Todd Kloots
            > <kloots@...> wrote:
            > >
            > > Hey Mike -
            > >
            > > If "onContentReady" is failing you as well, can
            > you
            > > please provide us with an example page that we can
            > use
            > > to reproduce and (hopefully) fix the bug for the
            > next
            > > release?
            > >
            > > In the meantime, you can either instantiate your
            > menu
            > > instance using a "load" event handler for the
            > window
            > > object, or use "onAvailable" to detect the HTML
            > > element that is the next sibling of the root node
            > of
            > > your menu element. Either technique should ensure
            > > that your menu's childNodes are fully loaded in
            > the
            > > browser. Let me know if that doesn't work or make
            > > sense.
            > >
            > > - Todd
            > >
            > > --- mscanlon17 <mscanlon17@...> wrote:
            > >
            > > > I am having a strange problem here. I am using
            > the
            > > > same code as the
            > > > build Menu From Markup with Animation example
            > with a
            > > > different menu
            > > > structure and a different css file. However in
            > IE,
            > > > the onAvailable
            > > > does not work all the time. I get a error
            > message
            > > > that says "Internet
            > > > Explorer could not open the Internet Site
            > (URL)."
            > > > Even after most of
            > > > the page has loaded. If I use onWindowLoad
            > event it
            > > > works just fine
            > > > but the onAvailable does not work. I also tried
            > the
            > > > new
            > > > onContentAvailable method and I get the same
            > thing.
            > > > Has anyone else
            > > > run into this problem before? It is really
            > stumping
            > > > me.
            > > >
            > > > Thanks,
            > > > Mike
            > > >
            > > >
            > > >
            > > >
            > > >
            > > > Yahoo! Groups Links
            > > >
            > > > (Yahoo! ID required)
            > > >
            > > >
            > mailto:ydn-javascript-fullfeatured@yahoogroups.com
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > >
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            > (Yahoo! ID required)
            >
            > mailto:ydn-javascript-fullfeatured@yahoogroups.com
            >
            >
            >
            >
            >
            >
          • dgaryet
            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.
            Message 5 of 8 , Nov 27, 2006
            • 0 Attachment
              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).
            • Todd Kloots
              Are you sure that you tried initializing the menu inside a load event handler for the window (as in this example:
              Message 6 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 7 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 8 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.