I find out what was wrong. Just like checkboxes in struts, I have to reset the attribute before I populate it. The script works, but struts is just a little more stubborn.
Thanks for your help! Shinta Manning Web Developer (515)557-8880 MAC F4030-030 . AIM Upcoming PTO: December 18th - January 4th, 2009 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of kangax Sent: Friday, January 09, 2009 10:28 PM To: Prototype & script.aculo.us Subject: [Proto-Scripty] Re: Removing option from form bean On Jan 9, 7:04 pm, cyiam <[email protected]> wrote: [...] > HELP! > > The javascript looks as below: > > $('removeFeature').observe('click',function(){ > var deletedFeatures = $A($F('features')); > deletedFeatures.each( > function(feature){ > $(feature).remove(); > }); > }); Try something like: $('removeFeature').observe('click',function() { $A($('features').options).findAll(function(el) { return el.selected; }).invoke('remove'); }); P.S. It would be nice if there was a support for `:selected` css pseudo class -- kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
