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

problem with a basic menu - 0.12.2

Expand Messages
  • denesszabo42
    Hi! I wanted to build a menu, but I could not managed it. FF 2.0.2 + firebug says: YAHOO.widget.Menu.superclass has no properties
    Message 1 of 3 , Feb 14, 2007
    View Source
    • 0 Attachment
      Hi!

      I wanted to build a menu, but I could not managed it.
      FF 2.0.2 + firebug says:

      YAHOO.widget.Menu.superclass has no properties
      http://thalesnano2.node/scripts/yui/menu/menu.js
      Line 582

      For this (I cut it from yui page)
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
      <title>Insert title here</title>

      <script type="text/javascript"
      src="/scripts/yui/yahoo/yahoo.js"></script>
      <script type="text/javascript" src="/scripts/yui/dom/dom.js"></script>
      <script type="text/javascript"
      src="/scripts/yui/event/event.js"></script>
      <script type="text/javascript"
      src="/scripts/yui/containter/container.js"></script>
      <link type="text/css" rel="stylesheet"
      href="/scripts/yui/menu/assets/menu.css" />
      <script type="text/javascript" src="/scripts/yui/menu/menu.js"></script>



      </head>
      <body>

      <div id="basicmenu" class="yuimenu">
      <div class="bd">
      <ul class="first-of-type">
      <li class="yuimenuitem"><a
      href="http://mail.yahoo.com">Yahoo! Mail</a></li>
      <li class="yuimenuitem"><a
      href="http://addressbook.yahoo.com">Yahoo! Address Book</a></li>
      <li class="yuimenuitem"><a
      href="http://calendar.yahoo.com">Yahoo! Calendar</a></li>
      <li class="yuimenuitem"><a
      href="http://notepad.yahoo.com">Yahoo! Notepad</a></li>
      </ul>
      </div>
      </div>
      <script type="text/javascript">
      var oMenu = new YAHOO.widget.Menu("basicmenu");
      oMenu.render();
      oMenu.show();
      </script>
      </body>
      </html>

      But I give same error if I try this:
      <script type="text/javascript">

      var oMenu = new YAHOO.widget.Menu("basicmenu", { visible: true });

      oMenu.render(document.body);
      oMenu.show();
      </script>

      I don't know what I think. I make a mistake or this is a bug?

      TIA!
      Den
    • jamoville
      ... src= /scripts/yui/menu/menu.js ... Ok this is going to kill you. Look at this line in your code:
      Message 2 of 3 , Feb 14, 2007
      View Source
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "denesszabo42"
        <denesszabo42@...> wrote:
        >
        > Hi!
        >
        > I wanted to build a menu, but I could not managed it.
        > FF 2.0.2 + firebug says:
        >
        > YAHOO.widget.Menu.superclass has no properties
        > http://thalesnano2.node/scripts/yui/menu/menu.js
        > Line 582
        >
        > For this (I cut it from yui page)
        > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        > "http://www.w3.org/TR/html4/loose.dtd">
        > <html>
        > <head>
        > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
        > <title>Insert title here</title>
        >
        > <script type="text/javascript"
        > src="/scripts/yui/yahoo/yahoo.js"></script>
        > <script type="text/javascript" src="/scripts/yui/dom/dom.js"></script>
        > <script type="text/javascript"
        > src="/scripts/yui/event/event.js"></script>
        > <script type="text/javascript"
        > src="/scripts/yui/containter/container.js"></script>
        > <link type="text/css" rel="stylesheet"
        > href="/scripts/yui/menu/assets/menu.css" />
        > <script type="text/javascript"
        src="/scripts/yui/menu/menu.js"></script>
        >
        >
        >
        > </head>
        > <body>
        >
        > <div id="basicmenu" class="yuimenu">
        > <div class="bd">
        > <ul class="first-of-type">
        > <li class="yuimenuitem"><a
        > href="http://mail.yahoo.com">Yahoo! Mail</a></li>
        > <li class="yuimenuitem"><a
        > href="http://addressbook.yahoo.com">Yahoo! Address Book</a></li>
        > <li class="yuimenuitem"><a
        > href="http://calendar.yahoo.com">Yahoo! Calendar</a></li>
        > <li class="yuimenuitem"><a
        > href="http://notepad.yahoo.com">Yahoo! Notepad</a></li>
        > </ul>
        > </div>
        > </div>
        > <script type="text/javascript">
        > var oMenu = new YAHOO.widget.Menu("basicmenu");
        > oMenu.render();
        > oMenu.show();
        > </script>
        > </body>
        > </html>
        >
        > But I give same error if I try this:
        > <script type="text/javascript">
        >
        > var oMenu = new YAHOO.widget.Menu("basicmenu", { visible: true });
        >
        > oMenu.render(document.body);
        > oMenu.show();
        > </script>
        >
        > I don't know what I think. I make a mistake or this is a bug?
        >
        > TIA!
        > Den
        >
        Ok this is going to kill you. Look at this line in your code:
        <script type="text/javascript"
        src="/scripts/yui/containter/container.js"></script>

        See it, because it took me a while to see it. Ok - containter should
        be container. That's it. Nothing wrong with your code just a typo

        HAHA - hate when that happens
      • denesszabo42
        ... THX! (I have realized my mistake but just now get it that sb answered to me)
        Message 3 of 3 , May 8, 2007
        View Source
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, "jamoville"
          <john.hutchinson@...> wrote:

          > Ok this is going to kill you. Look at this line in your code:
          > <script type="text/javascript"
          > src="/scripts/yui/containter/container.js"></script>
          >
          > See it, because it took me a while to see it. Ok - containter should
          > be container. That's it. Nothing wrong with your code just a typo

          THX!
          (I have realized my mistake but just now get it that sb answered to me)
        Your message has been successfully submitted and would be delivered to recipients shortly.