I think you can just say: $('select_id').length = 0;
On Thu, Jun 5, 2008 at 10:56 AM, FernandezPablo <[EMAIL PROTECTED]> wrote: > > I know is a dumb question, but I'm trying to clear a dropdownList in > an elegant way. > > (Note I have prototype 1.5.0 and I can't use setValue()); > > I tried: > > $A($('select_id').options).clear() --> does not work (I believe $A > returns a new Array) > $('select_id').clear() --> does not work > > I'm actually iterating over the options and setting null to everyone > of them. I KNOW this can't be the easiest way of doing it. -- Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---