$$() will return an array, even if it only has one item.
I'd guess your issue has to do with the internal toString methods,
and how a single-element array is converted to a string for display
by alert().
If you must, try $$(#Object.Class))[0].id ... But If you're going to
do it that way, you're assuming you'll get a result (i.e.
#Object.Class exists). If you're so sure of its existence, it'd be
simpler to simply use $('some_id').
TAG
On May 4, 2007, at 8:45 AM, Garito wrote:
> Hi all!
> Did anyone knows why if I do that:
>
> alert($$(#Object.Class))
>
> I get object HTMLDivElement but if I do:
>
> alert($$(#Object.Class).id)
>
> I get undefined?
>
> Thanks!!!!
>
> --
> Mis Cosas: http://blogs.sistes.net/Garito
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---