I noticed that if I set the checked attribute on a radio button before
I attach it to the DOM, IE7 will not show the button as checked when
it is indeed appended to the DOM. It may happen to other IE versions
too.
var r = new Element(
'input', {
type: 'radio'
}
);
if (someCondition) {
r.writeAttribute('checked', 'checked');
}
$$('body').first.appendChild(r);
The only way to fix it for all browsers is to bypass Prototype and do
plain DOM manipulation with the defaultChecked attribute:
r.defaultChecked = true;
Is this a problem with Prototype or my problem? I thought the
writeAttribute function was supposed to handle cross browser
compatibility.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.