> If you want to use Prototype.js to do this, you need to convert the
> collection to an array, then use the each method.  But as I show
> below, there's no point in using that just to be cool and use
> Array.each, it's faster to write your own function to iterate over the
> collection rather than convert it to an array then iterate over it.

Thanks Rob for sharing my opinion ;-) Theses results I found yesterday
(i.e. $$('memberemail')) and thought "This is impossible"... Just
wanted to see if there are any other possibilities in the lib I didn't
know.

> Putting 2,000 elements in a page is absurd, but if that's what you
> want to do, write your own function to loop over the them, it's much
> faster than using Prototype.js's each() (Safari was 3x, Firefox 2x)
> and doesn't take any more code.  Here's a simple example:

You're absolute right, but tell this your customer if absolutely
insists on having a page with all of his users from a database and an
checkbox for mailing (or not) each of them ;-)

Again thanks for your effort.
Jens


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to