Prototype.js seems to extend the standard javascript array constructor. It adds some methods and properties. If I do the for (key in array) I get additional keys that I didn’t add. ________________________________ Von: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] Im Auftrag von Gregory Hill Gesendet: Freitag, 11. November 2005 16:35 An: rails-spinoffs@lists.rubyonrails.org Betreff: RE: [Rails-spinoffs] array.each() on associative array? Can’t you just do this? It’s built into javascript: for (key in arrayname) { alert(key + ‘=’ + arrayname[key]); } ________________________________ From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of Stich, Josef Sent: Friday, November 11, 2005 3:32 AM To: rails-spinoffs@lists.rubyonrails.org Subject: [Rails-spinoffs] array.each() on associative array? Hi List! Is there a way to iterate through an associative array when prototype.js is used? arrayname.each(function (i) { alert(i); }); seems to work only for numeric arrays. Thanks, Josef Stich _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs