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

this.init error when creating layout

Expand Messages
  • Stuart Grimshaw
    Can anyone point out what s going wrong here? I m trying to get a very basic layout displayed, but when I try and instantiate a new layout object, I get the
    Message 1 of 6 , Aug 19, 2008
    • 0 Attachment
      Can anyone point out what's going wrong here? I'm trying to get a very
      basic layout displayed, but when I try and instantiate a new layout
      object, I get the following error:

      this.init is not a function
      this.init(el, map);

      (in firebug) on line 486 of element-beta.js.

      You can see the code etc here:

      http://yui.stuartgrimshaw.co.uk/

      Cheers.
    • Frank Dietrich
      ... I get this error when I forget to include one of the necessary JS-files or the order of adding the JS-files is not correct www.dd-tech.de -
      Message 2 of 6 , Aug 19, 2008
      • 0 Attachment
        >
        >this.init is not a function
        > this.init(el, map);
        >
        >(in firebug) on line 486 of element-beta.js.
        >

        I get this error when I forget to include one of the necessary JS-files or the order of adding the JS-files is not correct


        www.dd-tech.de - www.personalplanung.com - www.kulturbox.de
      • Frank Dietrich
        ... ... the CSS-Files and dragdrop are missing http://developer.yahoo.com/yui/layout/ says:
        Message 3 of 6 , Aug 19, 2008
        • 0 Attachment
          >
          >this.init is not a function
          > this.init(el, map);
          >
          >(in firebug) on line 486 of element-beta.js.
          >


          ...

          the CSS-Files and dragdrop are missing

          http://developer.yahoo.com/yui/layout/

          says:

          <!-- Skin CSS files resize.css must load before layout.css -->
          <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/assets/skins/sam/resize.css">
          <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/assets/skins/sam/layout.css">
          <!-- Utility Dependencies -->
          <script src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
          <script src="http://yui.yahooapis.com/2.5.2/build/dragdrop/dragdrop-min.js"></script>
          <script src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"></script>
          <!-- Optional Animation Support-->
          <script src="http://yui.yahooapis.com/2.5.2/build/animation/animation-min.js"></script>
          <!-- Optional Resize Support -->
          <script src="http://yui.yahooapis.com/2.5.2/build/resize/resize-beta-min.js"></script>
          <!-- Source file for the Layout Manager -->
          <script src="http://yui.yahooapis.com/2.5.2/build/layout/layout-beta-min.js"></script>



          www.dd-tech.de - www.personalplanung.com - www.kulturbox.de
        • Dav Glass
          Stuart -- You forgot the new keyword: var layout = YAHOO.widget.Layout( layout , Should be: var layout = new YAHOO.widget.Layout( layout , Dav Dav Glass
          Message 4 of 6 , Aug 19, 2008
          • 0 Attachment
            Stuart --

            You forgot the new keyword:
            var layout = YAHOO.widget.Layout('layout',

            Should be:
            var layout = new YAHOO.widget.Layout('layout',


            Dav

            Dav Glass
            dav.glass@...
            blog.davglass.com




            + Windows: n. - The most successful computer virus, ever. +
            + A computer without a Microsoft operating system is like a dog
            without bricks tied to its head +
            + A Microsoft Certified Systems Engineer is to computing what a
            McDonalds Certified Food Specialist is to fine cuisine +



            ----- Original Message ----
            From: Stuart Grimshaw <stuart.grimshaw@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Tuesday, August 19, 2008 7:32:19 AM
            Subject: [ydn-javascript] this.init error when creating layout

            Can anyone point out what's going wrong here? I'm trying to get a very
            basic layout displayed, but when I try and instantiate a new layout
            object, I get the following error:

            this.init is not a function
            this.init(el, map);

            (in firebug) on line 486 of element-beta.js.

            You can see the code etc here:

            http://yui.stuartgrimshaw.co.uk/

            Cheers.


            ------------------------------------

            Yahoo! Groups Links
          • Stuart Grimshaw
            ... Dammit. Thank s Dav. -S
            Message 5 of 6 , Aug 19, 2008
            • 0 Attachment
              --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
              > You forgot the new keyword:
              >
              > Should be:
              > var layout = new YAHOO.widget.Layout('layout',

              Dammit.

              Thank's Dav.

              -S
            • Frank Dietrich
              ... great! Being able to read must be a undescribable feeling :-D
              Message 6 of 6 , Aug 19, 2008
              • 0 Attachment
                >You forgot the new keyword:
                >var layout = YAHOO.widget.Layout('layout',
                >
                >Should be:
                >var layout = new YAHOO.widget.Layout('layout',

                great! Being able to read must be a undescribable feeling :-D
              Your message has been successfully submitted and would be delivered to recipients shortly.