Index: public/javascripts/selectmultiple.js =================================================================== --- public/javascripts/selectmultiple.js (revision 6519) +++ public/javascripts/selectmultiple.js (working copy) @@ -63,13 +63,15 @@ }, setValue: function(value_string){ this.numberOfCheckedBoxes = 0; + this.checkboxes.each(function(checkbox){ + checkbox.checked = false; + }); (value_string.split ? value_string.split(this.options.valueSeparator) : value_string).each(function(value){ this.checkboxes.each(function(checkbox){ if(checkbox.value == value){ ++this.numberOfCheckedBoxes; checkbox.checked = true; - }else - checkbox.checked = false; + } }.bind(this)); }.bind(this)); this.scanCheckBoxes(); @@ -140,4 +142,4 @@ } } });