CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    Bristol, England
    Posts
    66

    Prototype.js - destination is undefined

    Hi,

    I'm trying to use a javascript tabstrip script called aptabs, which uses prototype.js. However, prototype.js won't load properly, because the following error occurs in prototype.js:

    destination is undefined

    on the following line (3042):

    destination[property] = value.methodize();

    The function this line is in is:
    Code:
      function copy(methods, destination, onlyIfAbsent) {
        onlyIfAbsent = onlyIfAbsent || false;
        for (var property in methods) {
          var value = methods[property];
          if (!Object.isFunction(value)) continue;
          if (!onlyIfAbsent || !(property in destination))
            destination[property] = value.methodize();
        }
      }
    I've tried using versions 1.6.0 all the way up to 1.6.1, but I still get the same error.

    Can someone suggest what this error could be caused by and possible fixes?

    Debbie
    QuicknEasySalesPro.com
    - your quick and easy, yet powerful solution for managing your
    membership site sales, downloads and affiliates.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Prototype.js - destination is undefined

    According to this, it would seem that you aren't passing the correct parameters. However...

    Prototype is a rather large library. I would suggest contacting them first because they would know best. You also might want to include your code that references prototype's copy() method.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Feb 2004
    Location
    Bristol, England
    Posts
    66

    Re: Prototype.js - destination is undefined

    Hi PeejAvery,

    Unfortunately, it's not my code that's calling it. Prototype.js came with aptabs and I just followed the instructions to add it into the appropriate folders and my code.

    I picked aptabs up from javascriptkit.com and I can't find any support link for it there or for prototype.js from any searches I've done for it.

    Any idea who does prototype.js?

    Debbie
    QuicknEasySalesPro.com
    - your quick and easy, yet powerful solution for managing your
    membership site sales, downloads and affiliates.

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Prototype.js - destination is undefined

    Since apTabs works from javascriptkit.com, why don't you try using their prototype.js page which is version 1.6.0.2. Also, you could just grab their JS source file as well.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Feb 2004
    Location
    Bristol, England
    Posts
    66

    Re: Prototype.js - destination is undefined

    Hi PeejAvery,

    apTabs comes with version 1.6.0.2, but I've just tried it with the version at the end of your link, but still got the same error.

    Oh dear, I've run out of ideas now.
    QuicknEasySalesPro.com
    - your quick and easy, yet powerful solution for managing your
    membership site sales, downloads and affiliates.

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: Prototype.js - destination is undefined

    I suggest, rather than downloading the source code, take the exact linked files that the example page uses.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured