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

Related posts:

  1. Prototype: submit multiple select with ajax call

Tagged: ,

§ Leave a Reply

What's this?

You are currently reading Checking radiobuttons with Prototype at westworld: a webmasters best friend.

meta