Hi,

I found where is the problem.

I assumed, that the Form.Element.setValue method sets the value of an 
element.

In case of checkboxes that is not true.
The method changes the state of checked/unchecked instead, and leaves 
the value attribute unchanged.

The example might be found here:

http://tsalarioth.art.pl/~sw/setValueTest.html

As you can see, if you click on the button "set value of checkbox to: 
" with empty input, the checkbox is unchecked. If the value is not 
empty, then checkbox will be checked.

I do not understand why this behaviour was chosen, but I understand 
that it can't be changed now, as it would break backward compatibility.

Anyway I think the setValue method needs better documentation, as it 
is now a  little bit misleading.

I will open a lighthouse DOC ticket for this.

Best regards,
SWilk






--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to