Checking radiobuttons with Prototype

October 23rd, 2008 § 0

example:
<input type='radio' name='test' value='1' />
<input type='radio' name='test' id='nr2' value='2' />
<input type='radio' name='test' value='3' />

$$("input[type=radio][name='test'][value='3']")[0].writeAttribute("checked", "checked");
or
$("nr2").writeAttribute("checked", "checked");

Related Blogs

Where Am I?

You are currently browsing entries tagged with radiobutton at westworld: a webmasters best friend.