My form bean list has the following values:
<select id="features" name="features" multiple >
<option value="17" id="17">Some cool feature</option>
<option value="19" id="19">Another cool feature</option>
<option value="20" id="20">Awesome feature</option>
</select>
<button id="removeFeature" name="removeFeature" value="Remove
Feature">>> -</button>
When I select on "Awesome feature" option and click on the
"removeFeature" button, the "features" element will show 2 remaining
options in the list. In other words, "Awesome feature" is no longer an
option. But when I submit the form, the form bean still has the 3
original options! I have tried everything (settting the selected to
false, added alerts, creating a dummy option etc), I'm out of ideas.
HELP!
The javascript looks as below:
$('removeFeature').observe('click',function(){
var deletedFeatures = $A($F('features'));
deletedFeatures.each(
function(feature){
$(feature).remove();
});
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---