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
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.
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
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.
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.
Re: Prototype.js - destination is undefined
I suggest, rather than downloading the source code, take the exact linked files that the example page uses.