Q: control.selectMultiple

Hello,

I have question about this extension. When I want to insert value to database - it's OK. Multiple should work well. But what about editing that. i tried the same code and at the end added multipleselecttwo.setValue('tigers,pumas'); but not the result i want, it selects the 'pumas' and nothing about multiple. What should I do?

Thanks in advance, Giedrius

Posted January 20th, 2008 at 2:57pm by Giedrius

Found bug i source code :-) line 69-70: doesn't need else. removed. works well :-)

Posted January 20th, 2008 at 6:01pm by Giedrius

Giedrius,

The only problem with removing line 69-70, the list does not deselect the first pre-selected option of the dropdown box when using a blank as the first field.

The problem lies within setValue:

setValue: function(value_string){
        this.numberOfCheckedBoxes = 0;
        (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 // Giedrius' removal suggestion
                    checkbox.checked = false; // Giedrius' removal suggestion
            }.bind(this));
        }.bind(this));
        this.scanCheckBoxes();

Anyone have any suggestions

Posted January 29th, 2008 at 11:32am by nklineg

Login or Register to Post