[Helma-user] helma.Html.prototype.radioButton
Melanie Reichel
melanie.reichel at knallgrau.at
Mon Jun 23 16:48:21 CEST 2008
Hi,
I had a problem with radio buttons. If there is a selectedValue given, the
corresponding radio button will not be checked.
The following code snippet in the helma.Html.prototype.radioButton function
seems to cause the problem (l. 367ff in Html.js from 2007-12-13):
if (attr.selectedValue != null) {
if (attr.value == attr.selectedValue)
attr.checked = "checked";
else
delete attr.checked;
delete attr.selectedValue;
}
Because it works for checkboxes I think this lines of code should be used
instead of in the radioButton function to solve the problem:
if (attr.selectedValue != null) {
if (helma.Html.isSelected(param.value, param.selectedValue))
attr.checked = "checked";
else
delete attr.checked;
delete attr.selectedValue;
}
Maybe it helps one of you, too.
Melanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://helma.org/pipermail/helma-user/attachments/20080623/7f5f4680/attachment.html
More information about the Helma-user
mailing list