You could use .select()
http://www.prototypejs.org/api/element/select
On May 13, 3:09 pm, elduderino
<jamesfiltn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:> Hi,
>
> This is an easy one i imagine but i can''t get it working with
> prototype code....i can do it with vanilla javascript.
>
> I have div that contains a variable amount of other divs (Its variable
> because this script involves draggables and droppables and the user
> can drag any no of divs in to one box). I''ve selected the
container
> div (''dropp'') and want to say get all the divs inside the
container
> and add their id to an array...
>
> So i have this which currently doesn''t work...it throws an error:
>
> var dropBox1contents =
$(''dropp'').down(''div'');
> dropBox1contents.each(function(box) {
> //add id to array here
>
> the error is that dropbox1contents has no properties
>
> any ideas?
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---