On May 28, 6:02 am, Sebastian Sastre <[EMAIL PROTECTED]> wrote:
> Well seems to be that is not enough. Don't matters I put
> a) var listeners = new Collection;
> b) var listeners = new Collection();
> c) listeners = new Collection;
> d) listeners = new Collection();
>
> in the initialize function Firebug is telling me that Collection is
> not defined.
If you want to see if Collection (or any other identifier) is defined:
alert(typeof Collection);
> Collection is a standard class in javascript right? or one should
> include something or what?
Javascript doesn't have classes, it has objects. There is no built-in
Collection object in ECMA script, though the DOM does have an
HTMLCollection based on a NodeList - but I don't think that's what
you're after.
The word "Collection" doesn't appear anywhere in Prototype.js or
Scriptaculous.js. You may be after what Prototype calls a hash, look
at $H():
<URL: http://www.prototypejs.org/api/hash >
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---