Hi,

I just bumped into a weird bug in my code.
The thing is, that I am trying to update value of several checkboxes 
with a value received in a result of ajax call.

Anyway, I have following construction:

<input name="someName" class="APP_CHANGELOG_LOG_ID" value="" 
type="checkbox"/>

The checkboxes are unchecked by default.

In the script I do:

$$('.APP_CHANGELOG_LOG_ID').invoke('setValue',111);

But the values stays intact.

If I do this this way, it works:

$$('.APP_CHANGELOG_LOG_ID').each(
function(checkbox) {
   checkbox.value = 112
});

Is it me, or the setValue does not work on checkboxes?
I just tried to do simple:

$('publishChangelogSvn').setValue(111);

in Firebug console, where publishChangelogSvn is a checkbox. It does 
not matter if it is checked or not. It just do not set the value.

Docs does not mention anything about checkboxes...
http://api.prototypejs.org/dom/form/element.html#setvalue-class_method

Working with prototype 1.6.1.

Do you have had the same issue?

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